diff options
Diffstat (limited to 'Tests/CompileDefinitions/target_prop/CMakeLists.txt')
-rw-r--r-- | Tests/CompileDefinitions/target_prop/CMakeLists.txt | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/Tests/CompileDefinitions/target_prop/CMakeLists.txt b/Tests/CompileDefinitions/target_prop/CMakeLists.txt index 1ef2d6d..6bf9c5c 100644 --- a/Tests/CompileDefinitions/target_prop/CMakeLists.txt +++ b/Tests/CompileDefinitions/target_prop/CMakeLists.txt @@ -5,7 +5,11 @@ add_executable(target_prop_executable ../compiletest.cpp) set_target_properties(target_prop_executable PROPERTIES COMPILE_DEFINITIONS CMAKE_IS_FUN) -set_property(TARGET target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS CMAKE_IS_REALLY="Very Fun" CMAKE_IS=Fun) +if (NOT NO_SPACES_IN_DEFINE_VALUES) + set_property(TARGET target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS CMAKE_IS_REALLY="Very Fun" CMAKE_IS=Fun) +else() + set_property(TARGET target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS CMAKE_IS=Fun) +endif() set_property(TARGET target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS CMAKE_IS_FUN CMAKE_IS_="Fun") set_property(TARGET target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS @@ -13,9 +17,35 @@ set_property(TARGET target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS "$<1:CMAKE_IS_DECLARATIVE>" "$<0:GE_NOT_DEFINED>" "$<1:ARGUMENT;LIST>" + PREFIX_$<JOIN:DEF1;DEF2,;PREFIX_> + LETTER_LIST1=\"$<JOIN:A;B;C;D,,>\" + LETTER_LIST2=\"$<JOIN:A;B;C;D,,,>\" + LETTER_LIST3=\"$<JOIN:A;B;C;D,,->\" + LETTER_LIST4=\"$<JOIN:A;B;C;D,-,->\" + LETTER_LIST5=\"$<JOIN:A;B;C;D,-,>\" + "$<$<LINK_LANGUAGE:CXX>:LINK_CXX_DEFINE>" + "$<$<LINK_LANGUAGE:C>:LINK_C_DEFINE>" + "LINK_LANGUAGE_IS_$<LINK_LANGUAGE>" ) set_property(TARGET target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS BUILD_IS_DEBUG=$<CONFIG:Debug> BUILD_IS_NOT_DEBUG=$<NOT:$<CONFIG:Debug>> ) + +add_executable(target_prop_c_executable ../compiletest.c) + +set_property(TARGET target_prop_c_executable APPEND PROPERTY COMPILE_DEFINITIONS + "$<$<LINK_LANGUAGE:CXX>:LINK_CXX_DEFINE>" + "$<$<LINK_LANGUAGE:C>:LINK_C_DEFINE>" + "LINK_LANGUAGE_IS_$<LINK_LANGUAGE>" + ) + +# Resulting link language will be CXX +add_executable(target_prop_mixed_executable ../compiletest_mixed_c.c ../compiletest_mixed_cxx.cpp) + +set_property(TARGET target_prop_mixed_executable APPEND PROPERTY COMPILE_DEFINITIONS + "$<$<LINK_LANGUAGE:CXX>:LINK_CXX_DEFINE>" + "$<$<LINK_LANGUAGE:C>:LINK_C_DEFINE>" + "LINK_LANGUAGE_IS_$<LINK_LANGUAGE>" + ) |