Skip to content
Permalink
Browse files
CMakeLists.txt: require C++11 and C99; bump CMake min to 3.0
The bump to CMake 3.0 is just to acknowledge the fact that Python mapscript
in master requires a GENERATE command that requires 3.0 at least.
  • Loading branch information
rouault committed Dec 2, 2019
1 parent 3bfbc6c commit 50d44d24d0664534e96b2a3d322f4d3e201f8d3b
Showing 1 changed file with 19 additions and 1 deletion.
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.6)
cmake_minimum_required (VERSION 3.0)

project (MapServer)

@@ -20,6 +20,24 @@ set (MapServer_VERSION_MINOR 5)
set (MapServer_VERSION_REVISION 0)
set (MapServer_VERSION_SUFFIX "")

# Set C++ version
# Make CMAKE_CXX_STANDARD available as cache option overridable by user
set(CMAKE_CXX_STANDARD 11
CACHE STRING "C++ standard version to use (default is 11)")
message(STATUS "Requiring C++${CMAKE_CXX_STANDARD}")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
message(STATUS "Requiring C++${CMAKE_CXX_STANDARD} - done")

# Set C99 version
# Make CMAKE_C_STANDARD available as cache option overridable by user
set(CMAKE_C_STANDARD 99
CACHE STRING "C standard version to use (default is 99)")
message(STATUS "Requiring C${CMAKE_C_STANDARD}")
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
message(STATUS "Requiring C${CMAKE_C_STANDARD} - done")

set(TARGET_VERSION_MAJOR ${MapServer_VERSION_MAJOR})
set(TARGET_VERSION_MINOR ${MapServer_VERSION_MINOR})

0 comments on commit 50d44d2

Please sign in to comment.