mirror of https://github.com/OpenRCT2/OpenRCT2.git
Make CMake require C++17
Requires CMake 3.8+ which is the first version to support C++17 (see https://cmake.org/cmake/help/v3.8/prop_tgt/CXX_STANDARD.html). Fixes #7749.
This commit is contained in:
parent
13224104e4
commit
843f3a61ae
|
@ -1,5 +1,5 @@
|
|||
# CMAKE project for openrct2
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||
message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
|
||||
endif()
|
||||
|
@ -12,6 +12,9 @@ endif ()
|
|||
include(CheckCXXCompilerFlag)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")
|
||||
set(CMAKE_MACOSX_RPATH 1)
|
||||
|
||||
|
|
Loading…
Reference in New Issue