summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-07-27 13:08:14 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-07-27 13:08:35 (GMT)
commite423f530bafd3f2e5263f084e8caaf681e8436f0 (patch)
tree614e4173e210cf6d8681a0d11706209750ff1db9 /Tests
parentc15bb6f8b8c2eac691138e35d96570d537cc6d69 (diff)
parent91968ca66845dd560bb27710488a62b2be91c8ff (diff)
downloadCMake-e423f530bafd3f2e5263f084e8caaf681e8436f0.zip
CMake-e423f530bafd3f2e5263f084e8caaf681e8436f0.tar.gz
CMake-e423f530bafd3f2e5263f084e8caaf681e8436f0.tar.bz2
Merge topic 'test-compile-options-none'
91968ca668 Tests/CompileOptions: allow CMAKE_BUILD_TYPE=None Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6385
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CompileOptions/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt
index 96bafea..1bedac0 100644
--- a/Tests/CompileOptions/CMakeLists.txt
+++ b/Tests/CompileOptions/CMakeLists.txt
@@ -65,6 +65,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|AppleClang|MSVC)$")
string(APPEND CMAKE_CXX_FLAGS_RELEASE " -DFLAG_A=2 -DFLAG_C=1")
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -DFLAG_A=2 -DFLAG_C=1")
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL " -DFLAG_A=2 -DFLAG_C=1")
+ string(TOUPPER "${CMAKE_BUILD_TYPE}" _xbuild_type)
+ if(NOT _xbuild_type MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
+ string(APPEND CMAKE_CXX_FLAGS_${_xbuild_type} " -DFLAG_A=2 -DFLAG_C=1")
+ endif()
set_property(TARGET CompileOptions APPEND PROPERTY COMPILE_OPTIONS "-DFLAG_B=2" "-DFLAG_C=2" "-DFLAG_D=1")
set_property(TARGET testlib APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-DFLAG_D=2")
if(NOT CMAKE_GENERATOR MATCHES "^Visual Studio 9")