summaryrefslogtreecommitdiff
path: root/Tests/Complex
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-08-18 09:53:06 -0400
committerBrad King <brad.king@kitware.com>2008-08-18 09:53:06 -0400
commit7f7068e9d48666ce58f6ba9455a52e7fadee9d6f (patch)
tree13a69737cb6d663ea7b055b0d0d8bb5bdbccf5e7 /Tests/Complex
parentf2d2a82cd0030315e91307fa3a306a947e938d29 (diff)
downloadcmake-7f7068e9d48666ce58f6ba9455a52e7fadee9d6f.tar.gz
ENH: Add cmake_policy(GET) command mode
It is likely that projects or CMake modules in the future will need to check the value of a policy setting. For example, if we add a policy that affects the results of FindXYZ.cmake modules, the module code will need to be able to check the policy.
Diffstat (limited to 'Tests/Complex')
-rw-r--r--Tests/Complex/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index c3f94b72a0..b2ed25c6b8 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -7,6 +7,11 @@ PROJECT (Complex)
# Try setting a new policy. The IF test is for coverage.
IF(POLICY CMP0003)
CMAKE_POLICY(SET CMP0003 NEW)
+
+ CMAKE_POLICY(GET CMP0003 P3)
+ IF(NOT "${P3}" STREQUAL "NEW")
+ MESSAGE(FATAL_ERROR "CMAKE_POLICY(GET) did not report NEW!")
+ ENDIF(NOT "${P3}" STREQUAL "NEW")
ENDIF(POLICY CMP0003)
# Choose whether to test CMakeLib.