mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 11:22:21 -06:00
Tests/CompileOptions: allow CMAKE_BUILD_TYPE=None
In the same spirit of commit ce1cadd35a, (Tests/ConfigSources: fix for
non main stream CMAKE_BUILD_TYPE, 2021-04-01).
Allow distributions' check to pass seemlessly.
Issue: #22470
This commit is contained in:
committed by
Brad King
parent
0079f24f45
commit
91968ca668
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user