aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Taves <mwtoews@gmail.com>2020-02-04 14:12:23 +1300
committerMike Taves <mwtoews@gmail.com>2020-02-04 14:14:03 +1300
commit19b680c4612e531734a4fedfea0452ab11c7a0ae (patch)
tree64023e88787f2918b13cbf4d4205cdc0126e636b
parent6aadc40eacfc9fb7e10f81d3fb640be532830e5b (diff)
downloadPROJ-19b680c4612e531734a4fedfea0452ab11c7a0ae.tar.gz
PROJ-19b680c4612e531734a4fedfea0452ab11c7a0ae.zip
Increase CMake minimum version from 3.5 to 3.9
* Also remove a few if()-blocks to support older CMake versions
-rw-r--r--CMakeLists.txt7
-rw-r--r--cmake/ProjTest.cmake5
-rw-r--r--docs/source/install.rst2
-rw-r--r--src/lib_proj.cmake6
4 files changed, 6 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fde2b28a..5e0dba46 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,15 +9,14 @@
################################################################################
# General settings
################################################################################
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
# For historic reasons, the CMake PROJECT-NAME is PROJ4
project(PROJ4 LANGUAGES C CXX)
set(PROJECT_INTERN_NAME PROJ)
-if(NOT CMAKE_VERSION VERSION_LESS 3.1)
- cmake_policy(SET CMP0054 NEW)
-endif()
+# Only interpret if() arguments as variables or keywords when unquoted
+cmake_policy(SET CMP0054 NEW)
# Set C++ version
# Make CMAKE_CXX_STANDARD available as cache option overridable by user
diff --git a/cmake/ProjTest.cmake b/cmake/ProjTest.cmake
index 7797ed83..4fcd1c8e 100644
--- a/cmake/ProjTest.cmake
+++ b/cmake/ProjTest.cmake
@@ -20,11 +20,6 @@ function(proj_add_test_script_sh SH_NAME BIN_USE)
endif()
endif()
- if(CMAKE_VERSION VERSION_LESS 2.8.4)
- set(TEST_OK 0)
- message(STATUS "test with bash script need a cmake version >= 2.8.4")
- endif()
-
if(${TEST_OK})
add_test(NAME "${testname}"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/data
diff --git a/docs/source/install.rst b/docs/source/install.rst
index bda3c1fa..17cc7197 100644
--- a/docs/source/install.rst
+++ b/docs/source/install.rst
@@ -143,7 +143,7 @@ Build requirements
- SQLite3 >= 3.11 (headers, library and executable)
- libtiff >= 4.0 (headers and library)
- optional (but recommended): curl >= 7.29.0
-- GNU make for autotools build or CMake >= 3.5
+- GNU make for autotools build or CMake >= 3.9
Autotools
--------------------------------------------------------------------------------
diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake
index d89cfade..6bae0778 100644
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -376,10 +376,8 @@ if(ENABLE_LTO)
endif()
endif()
-if(NOT CMAKE_VERSION VERSION_LESS 2.8.11)
- target_include_directories(${PROJ_CORE_TARGET} INTERFACE
- $<INSTALL_INTERFACE:${INCLUDEDIR}>)
-endif()
+target_include_directories(${PROJ_CORE_TARGET} INTERFACE
+ $<INSTALL_INTERFACE:${INCLUDEDIR}>)
if(WIN32)
set_target_properties(${PROJ_CORE_TARGET}