summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-11-25 14:21:45 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-11-25 14:21:45 (GMT)
commit2b24fbf48ce00777738c306354c8c7ec2cb3237b (patch)
tree82b5ee97f3adf62a9735172c556308bce98a5b4d /Tests
parent75c73272862285b1b35575b04abbe871ac5e9b2e (diff)
parent378185fb7f672113257502ef96cf7106c22dd39f (diff)
downloadCMake-2b24fbf48ce00777738c306354c8c7ec2cb3237b.zip
CMake-2b24fbf48ce00777738c306354c8c7ec2cb3237b.tar.gz
CMake-2b24fbf48ce00777738c306354c8c7ec2cb3237b.tar.bz2
Merge topic 'test-cmake_policy-unmatched'
378185fb Tests: Add case for unmatched cmake_policy({PUSH,POP})
Diffstat (limited to 'Tests')
-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
7 files changed, 14 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)