aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2018-10-26 17:28:47 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2018-10-26 17:30:18 -0400
commit07d6f6bc61f9ad5d1f6ab39b878c3c9a230c3fcc (patch)
treeaf504a47dc5a75f4d15b55e39a7406c7de13b240
parent35eb793ff6b411cc88fc578b4d99e34cd25ca613 (diff)
downloadPROJ-07d6f6bc61f9ad5d1f6ab39b878c3c9a230c3fcc.tar.gz
PROJ-07d6f6bc61f9ad5d1f6ab39b878c3c9a230c3fcc.zip
ProjVersion: use cmake_parse_arguments
CMake provides this function, but only in CMake 2.8.3 and up. This minimum version bump is OK because it is from 2010, but the code requires C++11 features to exist. Any platform with a suitable compiler, but too-old of a CMake can easily compile the required CMake version as well.
-rw-r--r--CMakeLists.txt2
-rw-r--r--cmake/ProjVersion.cmake6
2 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69e93deb..ece1a455 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,7 @@
#################################################################################
# General settings
#################################################################################
-cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR)
# For historic reasons, the CMake PROJECT-NAME is PROJ4
project(PROJ4 LANGUAGES C CXX)
diff --git a/cmake/ProjVersion.cmake b/cmake/ProjVersion.cmake
index 1121cd36..f761dc47 100644
--- a/cmake/ProjVersion.cmake
+++ b/cmake/ProjVersion.cmake
@@ -17,8 +17,12 @@
# MAJOR.MINOR version is used to set SOVERSION
#
+include(CMakeParseArguments)
+
macro(proj_version)
- parse_arguments(THIS_VERSION "MAJOR;MINOR;PATCH;"
+ cmake_parse_arguments(THIS_VERSION
+ ""
+ "MAJOR;MINOR;PATCH"
""
${ARGN})