summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Languages
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/Languages')
-rw-r--r--Tests/RunCMake/Languages/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-ok-result.txt1
-rw-r--r--Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-ok.cmake6
-rw-r--r--Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-result.txt1
-rw-r--r--Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt7
-rw-r--r--Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex.cmake4
6 files changed, 21 insertions, 0 deletions
diff --git a/Tests/RunCMake/Languages/RunCMakeTest.cmake b/Tests/RunCMake/Languages/RunCMakeTest.cmake
index 59ef5dc..6517a81 100644
--- a/Tests/RunCMake/Languages/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Languages/RunCMakeTest.cmake
@@ -2,3 +2,5 @@ include(RunCMake)
run_cmake(NoLangSHARED)
run_cmake(LINK_LANGUAGE-genex)
+run_cmake(link-libraries-TARGET_FILE-genex)
+run_cmake(link-libraries-TARGET_FILE-genex-ok)
diff --git a/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-ok-result.txt b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-ok-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-ok-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-ok.cmake b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-ok.cmake
new file mode 100644
index 0000000..f0fd6e5
--- /dev/null
+++ b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-ok.cmake
@@ -0,0 +1,6 @@
+
+enable_language(CXX)
+
+add_library(foo SHARED empty.cpp)
+add_library(bar SHARED empty.cpp)
+target_link_libraries(foo $<$<STREQUAL:$<TARGET_FILE:bar>,anything>:bar>)
diff --git a/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-result.txt b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt
new file mode 100644
index 0000000..2d7a3c9
--- /dev/null
+++ b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<TARGET_FILE:foo>
+
+ Expressions which require the linker language may not be used while
+ evaluating link libraries
diff --git a/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex.cmake b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex.cmake
new file mode 100644
index 0000000..eca73e9
--- /dev/null
+++ b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex.cmake
@@ -0,0 +1,4 @@
+
+add_library(foo SHARED empty.cpp)
+add_library(bar SHARED empty.cpp)
+target_link_libraries(foo $<$<STREQUAL:$<TARGET_FILE:foo>,anything>:bar>)