[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.69 1.70
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Mar 20 18:26:01 EDT 2008
Update of /cvsroot/CMake/CMake/Tests/Complex
In directory public:/mounts/ram/cvs-serv32651/Tests/Complex
Modified Files:
CMakeLists.txt
Log Message:
ENH: Add "if(POLICY policy-id)" option for IF command.
- This will help projects support multiple CMake versions.
- In order to set a policy when using a newer CMake but still
working with an older CMake one may write
if(POLICY CMP1234)
cmake_policy(SET CMP1234 NEW)
endif(POLICY CMP1234)
- Note that since CMake 2.4 does not have if(POLICY) supporting
it will also require using "if(COMMAND cmake_policy)"
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Complex/CMakeLists.txt,v
retrieving revision 1.69
retrieving revision 1.70
diff -C 2 -d -r1.69 -r1.70
*** CMakeLists.txt 18 Jan 2008 01:34:10 -0000 1.69
--- CMakeLists.txt 20 Mar 2008 22:25:59 -0000 1.70
***************
*** 5,8 ****
--- 5,13 ----
PROJECT (Complex)
+ # Try setting a new policy. The IF test is for coverage.
+ IF(POLICY CMP0003)
+ CMAKE_POLICY(SET CMP0003 NEW)
+ ENDIF(POLICY CMP0003)
+
# Choose whether to test CMakeLib.
SET(COMPLEX_TEST_CMAKELIB 1)
More information about the Cmake-commits
mailing list