summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-08 15:33:18 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-11-08 15:33:18 (GMT)
commit110f2446011648ea3dc06faf8e1f0b6dbaebc5dd (patch)
treebfc69020565b4a6e6eeec0243062cd8944672595
parent2053e0cd51810d434ec4563186d5e2792d1c9cab (diff)
parent53b10fdad70c31dc5eb3b187833b8bcb498210e2 (diff)
downloadCMake-110f2446011648ea3dc06faf8e1f0b6dbaebc5dd.zip
CMake-110f2446011648ea3dc06faf8e1f0b6dbaebc5dd.tar.gz
CMake-110f2446011648ea3dc06faf8e1f0b6dbaebc5dd.tar.bz2
Merge topic 'test-LINK_ONLY-expression'
53b10fd Genex: Add a test for the LINK_ONLY expression.
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW.cmake14
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake6
-rw-r--r--Tests/RunCMake/CMP0022/RunCMakeTest.cmake1
4 files changed, 17 insertions, 5 deletions
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW.cmake b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW.cmake
new file mode 100644
index 0000000..3fee15d
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW.cmake
@@ -0,0 +1,14 @@
+
+project(CMP0022-NOWARN-static-NEW)
+
+cmake_policy(SET CMP0022 NEW)
+
+add_library(foo STATIC empty_vs6_1.cpp)
+add_library(bar STATIC empty_vs6_2.cpp)
+add_library(bat STATIC empty_vs6_3.cpp)
+target_link_libraries(foo bar)
+# The last element here needs to contain a space so that it is a single
+# element which is not a valid target name. As bar is a STATIC library,
+# this tests that the LINK_ONLY generator expression is not used for
+# that element, creating an error.
+target_link_libraries(bar LINK_PRIVATE bat "-lz -lm")
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake
index ad3b8df..3e4144f 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake
@@ -5,8 +5,4 @@ add_library(foo STATIC empty_vs6_1.cpp)
add_library(bar STATIC empty_vs6_2.cpp)
add_library(bat STATIC empty_vs6_3.cpp)
target_link_libraries(foo bar)
-# The last element here needs to contain a space so that it is a single
-# element which is not a valid target name. As bar is a STATIC library,
-# this tests that the LINK_ONLY generator expression is not used for
-# that element, creating an error.
-target_link_libraries(bar bat "-lz -lm")
+target_link_libraries(bar bat)
diff --git a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
index 2781d20..4c10996 100644
--- a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
@@ -7,6 +7,7 @@ run_cmake(CMP0022-WARN-empty-old)
run_cmake(CMP0022-NOWARN-exe)
run_cmake(CMP0022-NOWARN-shared)
run_cmake(CMP0022-NOWARN-static)
+run_cmake(CMP0022-NOWARN-static-NEW)
run_cmake(CMP0022-NOWARN-static-link_libraries)
run_cmake(CMP0022-export)
run_cmake(CMP0022-export-exe)