]> Creatis software - cpPlugins.git/blobdiff - CMakeLists.txt
...
[cpPlugins.git] / CMakeLists.txt
index a9a846f8741ac8734472d117d79837bb56eea42f..ea9d71a0d4a2c4a378dbfaa0e3455141d46850a0 100644 (file)
@@ -14,13 +14,18 @@ set(prj_REL 0)
 project(${prj_NAME} VERSION "${prj_MAJ}.${prj_MIN}.${prj_REL}")
 
 ## == Project policies
-set(_policies CMP0015 CMP0020 CMP0042 CMP0053)
-foreach(_p ${_policies})
+set(_new_policies CMP0015 CMP0020 CMP0042 CMP0053)
+set(_old_policies CMP0006)
+foreach(_p ${_new_policies})
   if(POLICY ${_p})
     cmake_policy(SET ${_p} NEW)
   endif(POLICY ${_p})
 endforeach(_p)
-cmake_policy(SET CMP0006 OLD)
+foreach(_p ${_old_policies})
+  if(POLICY ${_p})
+    cmake_policy(SET ${_p} OLD)
+  endif(POLICY ${_p})
+endforeach(_p)
 
 ## == Some general configuration
 include(cmake/cpPlgDefinitions.cmake)
@@ -65,3 +70,4 @@ include(cmake/cpPlgInstallCommands.cmake)
 subdirs(cmake)
 
 ## eof - $RCSfile$
+