Skip to content

Commit 3a182b2

Browse files
committed
refactor(cmake): require C++17 at target scope
1 parent 2372030 commit 3a182b2

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 3.16)
22
project(OpenGothicStarter VERSION 0.3.1 LANGUAGES CXX)
33
include(GNUInstallDirs)
44

5-
set(CMAKE_CXX_STANDARD 17)
6-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
7-
85
option(OGS_STRICT_WARNINGS "Enable strict compiler warnings." ON)
96
option(OGS_WARNINGS_AS_ERRORS "Treat warnings as errors." OFF)
107
option(OGS_EXTRA_WARNINGS "Enable additional warning checks." OFF)
@@ -61,6 +58,7 @@ if(WIN32)
6158
else()
6259
add_executable(${PROJECT_NAME} ${SOURCES})
6360
endif()
61+
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
6462

6563
# Windows-specific settings
6664
if(WIN32)

0 commit comments

Comments
 (0)