Skip to content

Commit

Permalink
Temp: Hard code property list
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrckschcknbch committed Feb 22, 2023
1 parent 93a7b93 commit 10ded79
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -320,21 +320,14 @@ find_package(Threads REQUIRED)
# Eigen3 (required)
find_package(Eigen3 3.3 REQUIRED NO_MODULE)

# Get all propreties that cmake supports
if(NOT CMAKE_PROPERTY_LIST)
execute_process(COMMAND cmake --help-property-list OUTPUT_VARIABLE CMAKE_PROPERTY_LIST)

# Convert command output into a CMake list
string(REGEX REPLACE ";" "\\\\;" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}")
string(REGEX REPLACE "\n" ";" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}")
endif()

function(print_target_properties tgt)
if(NOT TARGET ${tgt})
message("There is no target named '${tgt}'")
return()
endif()

set (CMAKE_PROPERTY_LIST BINARY_DIR IMPORTED INTERFACE_INCLUDE_DIRECTORIES NAME SOURCE_DIR SYSTEM TYPE)

foreach (prop ${CMAKE_PROPERTY_LIST})
string(REPLACE "<CONFIG>" "${CMAKE_BUILD_TYPE}" prop ${prop})

Expand Down

0 comments on commit 10ded79

Please sign in to comment.