diff options
author | Brad King <brad.king@kitware.com> | 2021-07-27 13:08:14 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-07-27 13:08:35 (GMT) |
commit | e423f530bafd3f2e5263f084e8caaf681e8436f0 (patch) | |
tree | 614e4173e210cf6d8681a0d11706209750ff1db9 /Tests | |
parent | c15bb6f8b8c2eac691138e35d96570d537cc6d69 (diff) | |
parent | 91968ca66845dd560bb27710488a62b2be91c8ff (diff) | |
download | CMake-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.txt | 4 |
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") |