diff options
author | Brad King <brad.king@kitware.com> | 2013-07-24 15:02:14 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-24 15:02:14 (GMT) |
commit | 6077847edc57f8104ba0c1edce16ce28178f899b (patch) | |
tree | d2bbb12bc8f55ce4a159d4810a9c7fcd643c4d33 /Tests/CompileDefinitions | |
parent | 52daa0ea34195fba893e61e72030df4840baa425 (diff) | |
parent | 4f6bd7022bf670f9516c7b5e67c254d639425ab4 (diff) | |
download | CMake-6077847edc57f8104ba0c1edce16ce28178f899b.zip CMake-6077847edc57f8104ba0c1edce16ce28178f899b.tar.gz CMake-6077847edc57f8104ba0c1edce16ce28178f899b.tar.bz2 |
Merge topic 'remove-LINK_LANGUAGE-genex'
4f6bd70 Remove the LINK_LANGUAGE generator expression.
Diffstat (limited to 'Tests/CompileDefinitions')
-rw-r--r-- | Tests/CompileDefinitions/compiletest_mixed_c.c | 4 | ||||
-rw-r--r-- | Tests/CompileDefinitions/compiletest_mixed_cxx.cpp | 4 | ||||
-rw-r--r-- | Tests/CompileDefinitions/target_prop/CMakeLists.txt | 19 |
3 files changed, 18 insertions, 9 deletions
diff --git a/Tests/CompileDefinitions/compiletest_mixed_c.c b/Tests/CompileDefinitions/compiletest_mixed_c.c index 698c989..a270b2b 100644 --- a/Tests/CompileDefinitions/compiletest_mixed_c.c +++ b/Tests/CompileDefinitions/compiletest_mixed_c.c @@ -13,6 +13,10 @@ #error Unexpected LINK_LANGUAGE_IS_C #endif +#ifndef C_EXECUTABLE_LINK_LANGUAGE_IS_C +#error Expected C_EXECUTABLE_LINK_LANGUAGE_IS_C define +#endif + void someFunc(void) { diff --git a/Tests/CompileDefinitions/compiletest_mixed_cxx.cpp b/Tests/CompileDefinitions/compiletest_mixed_cxx.cpp index c686854..ae6befc 100644 --- a/Tests/CompileDefinitions/compiletest_mixed_cxx.cpp +++ b/Tests/CompileDefinitions/compiletest_mixed_cxx.cpp @@ -13,6 +13,10 @@ #error Unexpected LINK_LANGUAGE_IS_C #endif +#ifndef C_EXECUTABLE_LINK_LANGUAGE_IS_C +#error Expected C_EXECUTABLE_LINK_LANGUAGE_IS_C define +#endif + int main(int argc, char **argv) { return 0; 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>" ) |