Bad koda!
authorunc0rr
Wed, 21 Nov 2012 17:57:05 +0400
changeset 8088 55f99b65e795
parent 8087 ccc99eebdac2
child 8089 56bf04303311
Bad koda!
CMakeLists.txt
--- a/CMakeLists.txt	Wed Nov 21 12:03:40 2012 +0100
+++ b/CMakeLists.txt	Wed Nov 21 17:57:05 2012 +0400
@@ -4,7 +4,9 @@
 cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
 cmake_policy(VERSION 2.6)
 FOREACH(hwpolicy CMP0003 CMP0012 CMP0017)
-    CMAKE_POLICY(SET ${hwpolicy} NEW)
+    IF(POLICY ${policy})
+        CMAKE_POLICY(SET ${hwpolicy} NEW)
+    ENDIF()
 ENDFOREACH()
 #use available modules, fallback to ours if not present (CMP0017 helps)
 set(CMAKE_MODULE_PATH "${CMAKE_ROOT}/Modules" "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")