From 07d6f6bc61f9ad5d1f6ab39b878c3c9a230c3fcc Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 26 Oct 2018 17:28:47 -0400 Subject: 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. --- CMakeLists.txt | 2 +- cmake/ProjVersion.cmake | 6 +++++- 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}) -- cgit v1.2.3