Tests: Add case for unmatched cmake_policy({PUSH,POP})

This commit is contained in:
Brad King 2015-11-24 09:12:58 -05:00
parent 29c1385675
commit 378185fb7f
7 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1 @@
1

View File

@ -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\)$

View File

@ -0,0 +1 @@
cmake_policy(PUSH)

View File

@ -0,0 +1 @@
1

View File

@ -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\)$

View File

@ -0,0 +1 @@
cmake_policy(POP)

View File

@ -1,4 +1,6 @@
include(RunCMake) include(RunCMake)
run_cmake(NotClosed)
run_cmake(NotOpened)
run_cmake(parent-dir-generate-time) run_cmake(parent-dir-generate-time)
run_cmake(dir-in-macro-generate-time) run_cmake(dir-in-macro-generate-time)