summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-14 10:34:10 -0500
committerBrad King <brad.king@kitware.com>2015-01-14 10:34:10 -0500
commita08a444bab783ffe8ca02ddf6a06d3c7be5983e3 (patch)
tree674af7ade77af3ed30283c275137410de8413686 /Tests
parent86d6ab06edfc000a7d6a405726887562e6e2f338 (diff)
parent23f3798c7b38ef7274f318ab90f1788b569dbc5d (diff)
downloadcmake-a08a444bab783ffe8ca02ddf6a06d3c7be5983e3.tar.gz
Merge branch 'fix-LOCATION-with-TARGET_OBJECTS' into release
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-result.txt1
-rw-r--r--Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt12
-rw-r--r--Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS.cmake6
-rw-r--r--Tests/RunCMake/CMP0026/RunCMakeTest.cmake1
4 files changed, 20 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-result.txt b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-result.txt
new file mode 100644
index 0000000000..573541ac97
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt
new file mode 100644
index 0000000000..0996cb6b4c
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt
@@ -0,0 +1,12 @@
+CMake Warning \(dev\) at LOCATION-and-TARGET_OBJECTS.cmake:[0-9]+ \(get_target_property\):
+ Policy CMP0026 is not set: Disallow use of the LOCATION target property.
+ Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
+ command to set the policy and suppress this warning.
+
+ The LOCATION property should not be read from target "bar". Use the target
+ name directly with add_custom_command, or use the generator expression
+ \$<TARGET_FILE>, as appropriate.
+
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS.cmake b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS.cmake
new file mode 100644
index 0000000000..3d8eb73d28
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS.cmake
@@ -0,0 +1,6 @@
+
+enable_language(CXX)
+
+add_library(foo OBJECT empty.cpp)
+add_executable(bar $<TARGET_OBJECTS:foo>)
+get_target_property(location bar LOCATION)
diff --git a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
index 7c2582f7aa..fc58ea5224 100644
--- a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
@@ -10,3 +10,4 @@ run_cmake(CMP0026-LOCATION-CONFIG-NEW)
run_cmake(CMP0026-LOCATION-CONFIG-OLD)
run_cmake(CMP0026-LOCATION-CONFIG-WARN)
run_cmake(ObjlibNotDefined)
+run_cmake(LOCATION-and-TARGET_OBJECTS)