summaryrefslogtreecommitdiffstats
path: root/Tests/Complex
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-08-18 13:53:06 (GMT)
committerBrad King <brad.king@kitware.com>2008-08-18 13:53:06 (GMT)
commit7f7068e9d48666ce58f6ba9455a52e7fadee9d6f (patch)
tree13a69737cb6d663ea7b055b0d0d8bb5bdbccf5e7 /Tests/Complex
parentf2d2a82cd0030315e91307fa3a306a947e938d29 (diff)
downloadCMake-7f7068e9d48666ce58f6ba9455a52e7fadee9d6f.zip
CMake-7f7068e9d48666ce58f6ba9455a52e7fadee9d6f.tar.gz
CMake-7f7068e9d48666ce58f6ba9455a52e7fadee9d6f.tar.bz2
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 c3f94b7..b2ed25c 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.