summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/TargetPropertyGeneratorExpressions
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-30 22:38:04 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-01-31 16:34:20 (GMT)
commit0b92602b816e2584db3781b120a1e5200da72ada (patch)
treeccf0d78b89d14d2bc317725b81ff3281d8b83ed1 /Tests/RunCMake/TargetPropertyGeneratorExpressions
parent0fa7f69c0e2cdcd8b7ece400651ee7821b2ede4b (diff)
downloadCMake-0b92602b816e2584db3781b120a1e5200da72ada.zip
CMake-0b92602b816e2584db3781b120a1e5200da72ada.tar.gz
CMake-0b92602b816e2584db3781b120a1e5200da72ada.tar.bz2
Add the $<LINKED:...> generator expression.
This is both a short form of using a TARGET_DEFINED expression together with a TARGET_PROPERTY definition, and a way to strip non-target content from interface properties when exporting.
Diffstat (limited to 'Tests/RunCMake/TargetPropertyGeneratorExpressions')
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-result.txt1
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-stderr.txt7
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked.cmake7
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake1
4 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-result.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-stderr.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-stderr.txt
new file mode 100644
index 0000000..4cd9cdd
--- /dev/null
+++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<LINKED:something>
+
+ \$<LINKED:...> may only be used in INCLUDE_DIRECTORIES and
+ COMPILE_DEFINITIONS properties.$
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked.cmake b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked.cmake
new file mode 100644
index 0000000..542ea76
--- /dev/null
+++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked.cmake
@@ -0,0 +1,7 @@
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp"
+ "int main(int, char **) { return 0; }\n")
+
+add_executable(TargetPropertyGeneratorExpressions
+ "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
+target_link_libraries(TargetPropertyGeneratorExpressions "$<LINKED:something>")
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake b/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake
index 0ee3238..ea48f61 100644
--- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake
+++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake
@@ -15,3 +15,4 @@ run_cmake(BadInvalidName5)
run_cmake(BadInvalidName6)
run_cmake(BadInvalidName7)
run_cmake(BadInvalidName8)
+run_cmake(BadLinked)