Debian Codegraph @

Tests/RunCMake/CpsMapConfig/TestMappedConfig.cmake

raw
1 macro(set_config_map CONFIG)
2 string(TOUPPER "${CONFIG}" CONFIG_UPPER)
3 set(CMAKE_MAP_IMPORTED_CONFIG_${CONFIG_UPPER} "${ANIMAL_CONFIGS}")
4 message(STATUS "CMAKE_MAP_IMPORTED_CONFIG_${CONFIG_UPPER} => \"${ANIMAL_CONFIGS}\"")
5 endmacro()
6
7 # Set up configuration maps
8 if(DEFINED CMAKE_BUILD_TYPE)
9 set_config_map(${CMAKE_BUILD_TYPE})
10 else()
11 foreach(CONFIG IN LISTS CMAKE_CONFIGURATION_TYPES)
12 set_config_map(${CONFIG})
13 endforeach()
14 endif()
15
16 # Find the test package
17 set(animal_DIR ${CMAKE_CURRENT_SOURCE_DIR})
18
19 find_package(animal REQUIRED)
20
21 # Set up the test executable
22 set(CMAKE_CXX_STANDARD 11)
23
24 add_executable(test test.cpp)
25 target_link_libraries(test animal::animal)