cmake: Only set policy in cmake 3.0.
authorAndreas Schneider <asn@samba.org>
Tue, 8 Apr 2014 07:40:15 +0000 (09:40 +0200)
committerAndreas Schneider <asn@samba.org>
Tue, 8 Apr 2014 07:40:15 +0000 (09:40 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
src/CMakeLists.txt

index c52b321f99698a4c4ac38b7cb34be8cd4fa075c8..e5dccc53e0e8efec2bd5de28698a9e57d7192e67 100644 (file)
@@ -22,6 +22,8 @@ install(
 )
 
 # This needs to be at the end
-cmake_policy(SET CMP0026 OLD)
+if (CMAKE_VERSION VERSION_GREATER 2.8.12)
+    cmake_policy(SET CMP0026 OLD)
+endif()
 get_target_property(NWRAP_LOCATION nss_wrapper LOCATION)
 set(NSS_WRAPPER_LOCATION ${NWRAP_LOCATION} PARENT_SCOPE)