diff options
Diffstat (limited to 'Tests/CompileDefinitions/target_prop/CMakeLists.txt')
-rw-r--r-- | Tests/CompileDefinitions/target_prop/CMakeLists.txt | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Tests/CompileDefinitions/target_prop/CMakeLists.txt b/Tests/CompileDefinitions/target_prop/CMakeLists.txt index 6bf9c5c..a0d3f4e 100644 --- a/Tests/CompileDefinitions/target_prop/CMakeLists.txt +++ b/Tests/CompileDefinitions/target_prop/CMakeLists.txt @@ -23,9 +23,9 @@ set_property(TARGET target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS 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>" + "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:LINK_CXX_DEFINE>" + "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,C>:LINK_C_DEFINE>" + "LINK_LANGUAGE_IS_$<TARGET_PROPERTY:LINKER_LANGUAGE>" ) set_property(TARGET target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS @@ -36,16 +36,17 @@ set_property(TARGET target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS 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>" + "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:LINK_CXX_DEFINE>" + "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,C>:LINK_C_DEFINE>" + "LINK_LANGUAGE_IS_$<TARGET_PROPERTY:LINKER_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>" + "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:LINK_CXX_DEFINE>" + "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,C>:LINK_C_DEFINE>" + "LINK_LANGUAGE_IS_$<TARGET_PROPERTY:LINKER_LANGUAGE>" + "C_EXECUTABLE_LINK_LANGUAGE_IS_$<TARGET_PROPERTY:target_prop_c_executable,LINKER_LANGUAGE>" ) |