Skip to content

Commit

Permalink
BUILD: Allow overwrite of cpp standard
Browse files Browse the repository at this point in the history
If CMAKE_CXX_STANDARD is specified on the command line when invoking
cmake, its value will be respected instead of being overwritten by
the project.
  • Loading branch information
Krzmbrzl committed Jan 21, 2024
1 parent 84e881d commit a090f8e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,19 @@ project(mumble
set(3RDPARTY_DIR "${CMAKE_SOURCE_DIR}/3rdparty")
set(PLUGINS_DIR "${CMAKE_SOURCE_DIR}/plugins")

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13)

list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/cmake"
"${CMAKE_SOURCE_DIR}/cmake/FindModules"
"${3RDPARTY_DIR}/FindPythonInterpreter"
"${3RDPARTY_DIR}/cmake-compiler-flags"
)

if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13)


include(pkg-utils)
include(project-utils)
Expand Down

0 comments on commit a090f8e

Please sign in to comment.