Merge pull request #872 from heinrich5991/pr_ddnet_cpp11

Change to C++11 in `CMakeLists.txt`, `bam.lua`
This commit is contained in:
Learath2 2017-09-22 02:56:01 +02:00 committed by GitHub
commit d6f2dc7521
2 changed files with 4 additions and 2 deletions

View file

@ -54,8 +54,7 @@ if(NOT(CMAKE_BUILD_TYPE))
set(CMAKE_BUILD_TYPE Release)
endif()
# Use C++14
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

View file

@ -205,6 +205,9 @@ function build(settings)
settings.cc.flags:Add("/EHsc")
else
settings.cc.flags:Add("-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
if config.compiler.driver == "gcc" then
settings.cc.flags_cxx:Add("-std=c++11")
end
if family == "windows" then
if config.compiler.driver == "gcc" then
settings.link.flags:Add("-static-libgcc")