summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Languages
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-18 10:58:48 (GMT)
committerBrad King <brad.king@kitware.com>2013-07-24 14:40:00 (GMT)
commit4f6bd7022bf670f9516c7b5e67c254d639425ab4 (patch)
tree710881681b38d86aa8801dabcce2895206c6f969 /Tests/RunCMake/Languages
parentf82c751d7b3ee3907d780060985a36bdddcabad3 (diff)
downloadCMake-4f6bd7022bf670f9516c7b5e67c254d639425ab4.zip
CMake-4f6bd7022bf670f9516c7b5e67c254d639425ab4.tar.gz
CMake-4f6bd7022bf670f9516c7b5e67c254d639425ab4.tar.bz2
Remove the LINK_LANGUAGE generator expression.
It accepted an optional argument to test for equality, but no way to get the linker language of a particular target. TARGET_PROPERTY provides this flexibility and STREQUAL provides the necessary API for equality test. Extend the CompileDefinitions test to cover accessing the property of another target.
Diffstat (limited to 'Tests/RunCMake/Languages')
-rw-r--r--Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt5
-rw-r--r--Tests/RunCMake/Languages/LINK_LANGUAGE-genex.cmake2
2 files changed, 4 insertions, 3 deletions
diff --git a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt b/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt
index 8e0591d..a5d5d50 100644
--- a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt
+++ b/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt
@@ -1,6 +1,7 @@
CMake Error:
Error evaluating generator expression:
- \$<LINK_LANGUAGE>
+ \$<TARGET_PROPERTY:LINKER_LANGUAGE>
- \$<LINK_LANGUAGE> expression can not be used while evaluating link libraries
+ LINKER_LANGUAGE target property can not be used while evaluating link
+ libraries
diff --git a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex.cmake b/Tests/RunCMake/Languages/LINK_LANGUAGE-genex.cmake
index e0f8c57..d4e31cd 100644
--- a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex.cmake
+++ b/Tests/RunCMake/Languages/LINK_LANGUAGE-genex.cmake
@@ -1,4 +1,4 @@
add_library(foo SHARED empty.cpp)
add_library(bar SHARED empty.cpp)
-target_link_libraries(foo $<$<STREQUAL:$<LINK_LANGUAGE>,anything>:bar>)
+target_link_libraries(foo $<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,anything>:bar>)