Use cmake_policy() in a safe way
cmake_policy() by itself raises the minimum requirement on CMake.
We want it to be optional though, so add the necessary if() around
it.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2759781..cd5a23b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,9 @@
#
cmake_minimum_required(VERSION 2.8)
-cmake_policy(SET CMP0022 OLD)
+if(POLICY CMP0022)
+ cmake_policy(SET CMP0022 OLD)
+endif()
# Internal cmake modules
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)