diff options
author | Brad King <brad.king@kitware.com> | 2017-01-30 13:43:17 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-01-30 13:43:17 (GMT) |
commit | e6659f6323c75331f15fe93bb8d060ec03729738 (patch) | |
tree | cdf04ae83525f49dc2d79e4cd67379f0249ba4a8 /Tests | |
parent | cbabde81f26db615411aafc788b9a0db35a87267 (diff) | |
parent | f01045ea36621fbc66a87bb041cd403d47304211 (diff) | |
download | CMake-e6659f6323c75331f15fe93bb8d060ec03729738.zip CMake-e6659f6323c75331f15fe93bb8d060ec03729738.tar.gz CMake-e6659f6323c75331f15fe93bb8d060ec03729738.tar.bz2 |
Merge topic 'test-preprocess-configs'
f01045ea Tests: Make Preprocess test work in RelWithDebInfo and MinSizeRel
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Preprocess/CMakeLists.txt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt index 15f0338..807a427 100644 --- a/Tests/Preprocess/CMakeLists.txt +++ b/Tests/Preprocess/CMakeLists.txt @@ -214,18 +214,24 @@ set(FILE_PATH "${Preprocess_SOURCE_DIR}/file_def.h") set(TARGET_PATH "${Preprocess_SOURCE_DIR}/target_def.h") # Set some definition properties. -foreach(c "" "_DEBUG" "_RELEASE") +foreach(c "" "_DEBUG" "_RELEASE" "_RELWITHDEBINFO" "_MINSIZEREL") + set(FLAVOR "${c}") + # Treat RelWithDebInfo and MinSizeRel as Release to avoid having + # an exponentional matrix of inclusions and exclusions of defines + if("${c}" STREQUAL "_RELWITHDEBINFO" OR "${c}" STREQUAL "_MINSIZEREL") + set(FLAVOR "_RELEASE") + endif() set_property( DIRECTORY . - APPEND PROPERTY COMPILE_DEFINITIONS${c} "DIRECTORY_DEF${c}" + APPEND PROPERTY COMPILE_DEFINITIONS${c} "DIRECTORY_DEF${FLAVOR}" ) set_property( TARGET Preprocess - PROPERTY COMPILE_DEFINITIONS${c} "TARGET_DEF${c}" + PROPERTY COMPILE_DEFINITIONS${c} "TARGET_DEF${FLAVOR}" ) set_property( SOURCE preprocess.c preprocess.cxx - PROPERTY COMPILE_DEFINITIONS${c} "FILE_DEF${c}" + PROPERTY COMPILE_DEFINITIONS${c} "FILE_DEF${FLAVOR}" ) endforeach() |