summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-15 15:22:29 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-05-15 15:22:29 (GMT)
commit912dff6253891dacb6a0196456adab26516a0949 (patch)
treedb3d3e311f203e08b46044b6f572731f6c47becd /Tests
parente0a2be659f0e7262291ce2e9ece09c1812e41565 (diff)
parentb85d3b66c63afa1ce7f30439deee524241b1efdc (diff)
downloadCMake-912dff6253891dacb6a0196456adab26516a0949.zip
CMake-912dff6253891dacb6a0196456adab26516a0949.tar.gz
CMake-912dff6253891dacb6a0196456adab26516a0949.tar.bz2
Merge topic 'disallow-install-of-export'
b85d3b66 install: Disallow installing export() result. 501c237a install: Use an intermediate filesVector variable.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/install/CMP0062-NEW-result.txt1
-rw-r--r--Tests/RunCMake/install/CMP0062-NEW-stderr.txt11
-rw-r--r--Tests/RunCMake/install/CMP0062-NEW.cmake6
-rw-r--r--Tests/RunCMake/install/CMP0062-OLD-result.txt1
-rw-r--r--Tests/RunCMake/install/CMP0062-OLD.cmake6
-rw-r--r--Tests/RunCMake/install/CMP0062-WARN-result.txt1
-rw-r--r--Tests/RunCMake/install/CMP0062-WARN-stderr.txt16
-rw-r--r--Tests/RunCMake/install/CMP0062-WARN.cmake4
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake3
9 files changed, 49 insertions, 0 deletions
diff --git a/Tests/RunCMake/install/CMP0062-NEW-result.txt b/Tests/RunCMake/install/CMP0062-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/CMP0062-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/CMP0062-NEW-stderr.txt b/Tests/RunCMake/install/CMP0062-NEW-stderr.txt
new file mode 100644
index 0000000..b03f629
--- /dev/null
+++ b/Tests/RunCMake/install/CMP0062-NEW-stderr.txt
@@ -0,0 +1,11 @@
+CMake Error at CMP0062-NEW.cmake:[0-9]+ \(install\):
+ The file
+
+ .*Tests/RunCMake/install/CMP0062-NEW-build/exported.cmake
+
+ was generated by the export\(\) command. It may not be installed with the
+ install\(\) command. Use the install\(EXPORT\) mechanism instead. See the
+ cmake-packages\(7\) manual for more.
+
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/install/CMP0062-NEW.cmake b/Tests/RunCMake/install/CMP0062-NEW.cmake
new file mode 100644
index 0000000..a696f56
--- /dev/null
+++ b/Tests/RunCMake/install/CMP0062-NEW.cmake
@@ -0,0 +1,6 @@
+
+cmake_policy(SET CMP0062 NEW)
+
+add_library(iface INTERFACE)
+export(TARGETS iface FILE "${CMAKE_CURRENT_BINARY_DIR}/exported.cmake")
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/exported.cmake" DESTINATION cmake)
diff --git a/Tests/RunCMake/install/CMP0062-OLD-result.txt b/Tests/RunCMake/install/CMP0062-OLD-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/install/CMP0062-OLD-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/install/CMP0062-OLD.cmake b/Tests/RunCMake/install/CMP0062-OLD.cmake
new file mode 100644
index 0000000..94b809a
--- /dev/null
+++ b/Tests/RunCMake/install/CMP0062-OLD.cmake
@@ -0,0 +1,6 @@
+
+cmake_policy(SET CMP0062 OLD)
+
+add_library(iface INTERFACE)
+export(TARGETS iface FILE "${CMAKE_CURRENT_BINARY_DIR}/exported.cmake")
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/exported.cmake" DESTINATION cmake)
diff --git a/Tests/RunCMake/install/CMP0062-WARN-result.txt b/Tests/RunCMake/install/CMP0062-WARN-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/install/CMP0062-WARN-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/install/CMP0062-WARN-stderr.txt b/Tests/RunCMake/install/CMP0062-WARN-stderr.txt
new file mode 100644
index 0000000..12ae745
--- /dev/null
+++ b/Tests/RunCMake/install/CMP0062-WARN-stderr.txt
@@ -0,0 +1,16 @@
+CMake Warning \(dev\) at CMP0062-WARN.cmake:[0-9]+ \(install\):
+ Policy CMP0062 is not set: Disallow install\(\) of export\(\) result. Run
+ "cmake --help-policy CMP0062" for policy details. Use the cmake_policy
+ command to set the policy and suppress this warning.
+
+ The file
+
+ .*Tests/RunCMake/install/CMP0062-WARN-build/exported.cmake
+
+ was generated by the export\(\) command. It should not be installed with the
+ install\(\) command. Use the install\(EXPORT\) mechanism instead. See the
+ cmake-packages\(7\) manual for more.
+
+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/install/CMP0062-WARN.cmake b/Tests/RunCMake/install/CMP0062-WARN.cmake
new file mode 100644
index 0000000..0435a64
--- /dev/null
+++ b/Tests/RunCMake/install/CMP0062-WARN.cmake
@@ -0,0 +1,4 @@
+
+add_library(iface INTERFACE)
+export(TARGETS iface FILE "${CMAKE_CURRENT_BINARY_DIR}/exported.cmake")
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/exported.cmake" DESTINATION cmake)
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 7149603..a5f5bd0 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -7,3 +7,6 @@ run_cmake(SkipInstallRulesWarning)
run_cmake(SkipInstallRulesNoWarning1)
run_cmake(SkipInstallRulesNoWarning2)
run_cmake(TARGETS-DESTINATION-bad)
+run_cmake(CMP0062-OLD)
+run_cmake(CMP0062-NEW)
+run_cmake(CMP0062-WARN)