From cf2e3227cc93504a9f547c2ed3bf627243c8bc58 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 12 May 2018 07:51:51 +0100 Subject: [PATCH] Removed use of deprecated cmake policy --- CMakeLists.txt | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dee66efdf..979fd59a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,25 +26,10 @@ if(COMMAND cmake_policy) # tell CMake to prefer CMake's own CMake modules when available # only available from cmake-2.8.4 - if(${CMAKE_MAJOR_VERSION} GREATER 2 OR - (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 8) OR - (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND ${CMAKE_PATCH_VERSION} GREATER 3)) + if("${CMAKE_VERSION}" VERSION_GREATER 2.8.3) cmake_policy(SET CMP0017 NEW) endif() - # cmake-2.6.1 introduces policy cmp0008 decide how to treat full path libraries that do not appear to be valid library file names - # quote from cvslog "Such libraries worked by accident in the VS IDE and Xcode generators in CMake 2.4 and below." - if(${CMAKE_MAJOR_VERSION} GREATER 2 OR - (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 6) OR - (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6 AND ${CMAKE_PATCH_VERSION} GREATER 0)) - cmake_policy(SET CMP0008 OLD) - endif() - - # nicer version check - but needs at least CMake 2.6.2? Worth upgrading the requirements? - #if("${CMAKE_VERSION}" VERSION_GREATER 2.8.10) - # or even easier (available in cmake-2.6) - #if(POLICY CMPxyzw) - endif() IF(APPLE)