--- 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")