Change to C++11 in CMakeLists.txt, bam.lua

This commit is contained in:
heinrich5991 2017-09-21 23:34:51 +02:00
parent 94c7c8d864
commit 72a17da716
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")