summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-11-24 19:09:54 (GMT)
committerBrad King <brad.king@kitware.com>2015-11-24 19:09:54 (GMT)
commit62126b67e0048800a833d3c4ea86d2307f1a4a06 (patch)
tree83f69354346030f0a1eee3028a9c0274fe306371
parent2e28c619f8997a2b86c72b53659be371ff10a790 (diff)
parentb219ff94acf0b6c934c35e2ce42dfbf99580f1e8 (diff)
downloadCMake-62126b67e0048800a833d3c4ea86d2307f1a4a06.zip
CMake-62126b67e0048800a833d3c4ea86d2307f1a4a06.tar.gz
CMake-62126b67e0048800a833d3c4ea86d2307f1a4a06.tar.bz2
Merge branch 'test-cmake_policy-unmatched' into fix-find_package-version-file-error-stack
-rw-r--r--Tests/RunCMake/PolicyScope/NotClosed-result.txt1
-rw-r--r--Tests/RunCMake/PolicyScope/NotClosed-stderr.txt4
-rw-r--r--Tests/RunCMake/PolicyScope/NotClosed.cmake1
-rw-r--r--Tests/RunCMake/PolicyScope/NotOpened-result.txt1
-rw-r--r--Tests/RunCMake/PolicyScope/NotOpened-stderr.txt4
-rw-r--r--Tests/RunCMake/PolicyScope/NotOpened.cmake1
-rw-r--r--Tests/RunCMake/PolicyScope/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/find_package/PolicyPop-result.txt1
-rw-r--r--Tests/RunCMake/find_package/PolicyPop-stderr.txt5
-rw-r--r--Tests/RunCMake/find_package/PolicyPop.cmake1
-rw-r--r--Tests/RunCMake/find_package/PolicyPop/PolicyPopConfig.cmake0
-rw-r--r--Tests/RunCMake/find_package/PolicyPop/PolicyPopConfigVersion.cmake3
-rw-r--r--Tests/RunCMake/find_package/PolicyPush-result.txt1
-rw-r--r--Tests/RunCMake/find_package/PolicyPush-stderr.txt5
-rw-r--r--Tests/RunCMake/find_package/PolicyPush.cmake1
-rw-r--r--Tests/RunCMake/find_package/PolicyPush/PolicyPushConfig.cmake0
-rw-r--r--Tests/RunCMake/find_package/PolicyPush/PolicyPushConfigVersion.cmake3
-rw-r--r--Tests/RunCMake/find_package/RunCMakeTest.cmake2
18 files changed, 36 insertions, 0 deletions
diff --git a/Tests/RunCMake/PolicyScope/NotClosed-result.txt b/Tests/RunCMake/PolicyScope/NotClosed-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/PolicyScope/NotClosed-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/PolicyScope/NotClosed-stderr.txt b/Tests/RunCMake/PolicyScope/NotClosed-stderr.txt
new file mode 100644
index 0000000..293d161
--- /dev/null
+++ b/Tests/RunCMake/PolicyScope/NotClosed-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at NotClosed.cmake:[0-9]+ \(include\):
+ cmake_policy PUSH without matching POP
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/PolicyScope/NotClosed.cmake b/Tests/RunCMake/PolicyScope/NotClosed.cmake
new file mode 100644
index 0000000..19b880e
--- /dev/null
+++ b/Tests/RunCMake/PolicyScope/NotClosed.cmake
@@ -0,0 +1 @@
+cmake_policy(PUSH)
diff --git a/Tests/RunCMake/PolicyScope/NotOpened-result.txt b/Tests/RunCMake/PolicyScope/NotOpened-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/PolicyScope/NotOpened-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/PolicyScope/NotOpened-stderr.txt b/Tests/RunCMake/PolicyScope/NotOpened-stderr.txt
new file mode 100644
index 0000000..f27aac8
--- /dev/null
+++ b/Tests/RunCMake/PolicyScope/NotOpened-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at NotOpened.cmake:[0-9]+ \(cmake_policy\):
+ cmake_policy POP without matching PUSH
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/PolicyScope/NotOpened.cmake b/Tests/RunCMake/PolicyScope/NotOpened.cmake
new file mode 100644
index 0000000..bb9f3a3
--- /dev/null
+++ b/Tests/RunCMake/PolicyScope/NotOpened.cmake
@@ -0,0 +1 @@
+cmake_policy(POP)
diff --git a/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake b/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake
index d6c021f..abd27f4 100644
--- a/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake
+++ b/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake
@@ -1,4 +1,6 @@
include(RunCMake)
+run_cmake(NotClosed)
+run_cmake(NotOpened)
run_cmake(parent-dir-generate-time)
run_cmake(dir-in-macro-generate-time)
diff --git a/Tests/RunCMake/find_package/PolicyPop-result.txt b/Tests/RunCMake/find_package/PolicyPop-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/find_package/PolicyPop-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_package/PolicyPop-stderr.txt b/Tests/RunCMake/find_package/PolicyPop-stderr.txt
new file mode 100644
index 0000000..745d39a
--- /dev/null
+++ b/Tests/RunCMake/find_package/PolicyPop-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at PolicyPop/PolicyPopConfigVersion.cmake:3 \(cmake_policy\):
+ cmake_policy POP without matching PUSH
+Call Stack \(most recent call first\):
+ PolicyPop.cmake:1 \(find_package\)
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/find_package/PolicyPop.cmake b/Tests/RunCMake/find_package/PolicyPop.cmake
new file mode 100644
index 0000000..4866f24
--- /dev/null
+++ b/Tests/RunCMake/find_package/PolicyPop.cmake
@@ -0,0 +1 @@
+find_package(PolicyPop 1 CONFIG PATHS ${CMAKE_CURRENT_SOURCE_DIR}/PolicyPop NO_DEFAULT_PATH)
diff --git a/Tests/RunCMake/find_package/PolicyPop/PolicyPopConfig.cmake b/Tests/RunCMake/find_package/PolicyPop/PolicyPopConfig.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/find_package/PolicyPop/PolicyPopConfig.cmake
diff --git a/Tests/RunCMake/find_package/PolicyPop/PolicyPopConfigVersion.cmake b/Tests/RunCMake/find_package/PolicyPop/PolicyPopConfigVersion.cmake
new file mode 100644
index 0000000..483fb10
--- /dev/null
+++ b/Tests/RunCMake/find_package/PolicyPop/PolicyPopConfigVersion.cmake
@@ -0,0 +1,3 @@
+set(PACKAGE_VERSION 1)
+set(PACKAGE_VERSION_COMPATIBLE 1)
+cmake_policy(POP)
diff --git a/Tests/RunCMake/find_package/PolicyPush-result.txt b/Tests/RunCMake/find_package/PolicyPush-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/find_package/PolicyPush-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_package/PolicyPush-stderr.txt b/Tests/RunCMake/find_package/PolicyPush-stderr.txt
new file mode 100644
index 0000000..1afcb16
--- /dev/null
+++ b/Tests/RunCMake/find_package/PolicyPush-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at PolicyPush/PolicyPushConfigVersion.cmake:1 \(find_package\):
+ cmake_policy PUSH without matching POP
+Call Stack \(most recent call first\):
+ PolicyPush.cmake:1 \(find_package\)
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/find_package/PolicyPush.cmake b/Tests/RunCMake/find_package/PolicyPush.cmake
new file mode 100644
index 0000000..30c3ce2
--- /dev/null
+++ b/Tests/RunCMake/find_package/PolicyPush.cmake
@@ -0,0 +1 @@
+find_package(PolicyPush 1 CONFIG PATHS ${CMAKE_CURRENT_SOURCE_DIR}/PolicyPush NO_DEFAULT_PATH)
diff --git a/Tests/RunCMake/find_package/PolicyPush/PolicyPushConfig.cmake b/Tests/RunCMake/find_package/PolicyPush/PolicyPushConfig.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/find_package/PolicyPush/PolicyPushConfig.cmake
diff --git a/Tests/RunCMake/find_package/PolicyPush/PolicyPushConfigVersion.cmake b/Tests/RunCMake/find_package/PolicyPush/PolicyPushConfigVersion.cmake
new file mode 100644
index 0000000..45a8dbd
--- /dev/null
+++ b/Tests/RunCMake/find_package/PolicyPush/PolicyPushConfigVersion.cmake
@@ -0,0 +1,3 @@
+set(PACKAGE_VERSION 1)
+set(PACKAGE_VERSION_COMPATIBLE 1)
+cmake_policy(PUSH)
diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake
index 42705b7..81b2906 100644
--- a/Tests/RunCMake/find_package/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake
@@ -13,4 +13,6 @@ run_cmake(MissingConfigOneName)
run_cmake(MissingConfigRequired)
run_cmake(MissingConfigVersion)
run_cmake(MixedModeOptions)
+run_cmake(PolicyPush)
+run_cmake(PolicyPop)
run_cmake(SetFoundFALSE)