]> git.mxchange.org Git - flightgear.git/commitdiff
Cmake policies conditional on Cmake version.
authorJames Turner <zakalawe@mac.com>
Mon, 9 Feb 2015 16:42:58 +0000 (16:42 +0000)
committerJames Turner <zakalawe@mac.com>
Mon, 9 Feb 2015 16:42:58 +0000 (16:42 +0000)
CMakeLists.txt

index fa8f728b434774319c45ee8bf2b37e6972d47652..505538c1afd3921bff61957d2920cd91877e7f8c 100644 (file)
@@ -6,8 +6,10 @@ include (CheckCXXSourceCompiles)
 include (CheckIncludeFile)
 
 if(COMMAND cmake_policy)
-    cmake_policy(SET CMP0054 NEW)
-    cmake_policy(SET CMP0042 NEW)
+    if(${CMAKE_MAJOR_VERSION} GREATER 2) # version 3 or higher
+        cmake_policy(SET CMP0054 NEW)
+        cmake_policy(SET CMP0042 NEW)
+    endif()
 endif()
 
 # set this before project()