mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user