diff --git a/CGALimageIO/src/CGALImageIO/CMakeLists.txt b/CGALimageIO/src/CGALImageIO/CMakeLists.txt index ce782368b8b..3236e45a49d 100644 --- a/CGALimageIO/src/CGALImageIO/CMakeLists.txt +++ b/CGALimageIO/src/CGALImageIO/CMakeLists.txt @@ -1,6 +1,10 @@ project (CGAL_ImageIO) -CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2 FATAL_ERROR) +# Minimal version of CMake: +cmake_minimum_required(VERSION 2.6.2) + +# Tested version: +cmake_policy(VERSION 2.8.4) if ( NOT CGAL_FOUND ) find_package(CGAL REQUIRED) diff --git a/GraphicsView/src/CGALQt4/CMakeLists.txt b/GraphicsView/src/CGALQt4/CMakeLists.txt index 71f7c6226e1..e91b389dc24 100644 --- a/GraphicsView/src/CGALQt4/CMakeLists.txt +++ b/GraphicsView/src/CGALQt4/CMakeLists.txt @@ -1,7 +1,11 @@ project (CGAL_Qt4) -CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2 FATAL_ERROR) - +# Minimal version of CMake: +cmake_minimum_required(VERSION 2.6.2) + +# Tested version: +cmake_policy(VERSION 2.8.4) + if ( NOT CGAL_FOUND ) find_package(CGAL REQUIRED) endif() diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 93c39f28242..6e991ddecf6 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -5,15 +5,11 @@ # ${CMAKE_BINARY_DIR} or ${CMAKE_BINARY_DIR}. project(CGAL) -cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) +# Minimal version of CMake: +cmake_minimum_required(VERSION 2.6.2) -# This allows else(), endif(), etc... (without repeating the expression) -set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) - -if ( COMMAND cmake_policy ) - # Libraries linked via full path no longer produce linker search paths. - cmake_policy( SET CMP0003 NEW ) -endif( COMMAND cmake_policy ) +# Tested version: +cmake_policy(VERSION 2.8.4) #-------------------------------------------------------------------------------------------------- # diff --git a/Installation/cmake/modules/CGAL_Common.cmake b/Installation/cmake/modules/CGAL_Common.cmake index f38fd6df484..5b21a32ceba 100644 --- a/Installation/cmake/modules/CGAL_Common.cmake +++ b/Installation/cmake/modules/CGAL_Common.cmake @@ -25,34 +25,6 @@ if( NOT CGAL_COMMON_FILE_INCLUDED ) set( CMAKE_2_6_3_OR_ABOVE FALSE ) endif() - if ( COMMAND cmake_policy ) - # CMP0007 OLD means: list command ignores empty elements - cmake_policy( SET CMP0007 OLD ) - if ( CMAKE_2_6_3_OR_ABOVE ) - # CMP0011 OLD means: Included scripts do NOT automatic cmake_policy - # PUSH and POP. - # We set that policy to OLD to avoid a warning. We probably could - # have set to the NEW policy. - cmake_policy( SET CMP0011 OLD ) - endif() - if(POLICY CMP0017) - # New policy since CMake 2.8.4 - if(NOT RUNNING_CGAL_AUTO_TEST) - # We do not set this in the testsuite, to see the warnings. - cmake_policy( SET CMP0017 OLD ) - endif() - # CMP0017 OLD means: we want to be able to override CMake modules - # that are shipped with CMake. - # For the moment, we override: - # FindBLAS.cmake - # FindBoost.cmake - # FindLAPACK.cmake - # FindOpenGL.cmake - # FindPackageMessage.cmake - # Laurent Rineau, 2011/03/09 - endif() - endif() - if ( "${BUILD_SHARED_LIBS}" STREQUAL "" ) if ( WIN32 ) set(BUILD_SHARED_LIBS OFF) diff --git a/Qt_widget/src/CGALQt3/CMakeLists.txt b/Qt_widget/src/CGALQt3/CMakeLists.txt index 924afdf05e2..c8c0c75e6e4 100644 --- a/Qt_widget/src/CGALQt3/CMakeLists.txt +++ b/Qt_widget/src/CGALQt3/CMakeLists.txt @@ -1,6 +1,10 @@ project (CGAL_Qt3) -CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2 FATAL_ERROR) +# Minimal version of CMake: +cmake_minimum_required(VERSION 2.6.2) + +# Tested version: +cmake_policy(VERSION 2.8.4) if ( NOT CGAL_FOUND ) find_package(CGAL REQUIRED)