From 72a17da7162bf04ce54ccb147499da69bb890eaf Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Thu, 21 Sep 2017 23:34:51 +0200 Subject: [PATCH] Change to C++11 in `CMakeLists.txt`, `bam.lua` --- CMakeLists.txt | 3 +-- bam.lua | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 54b965266..f3b2719a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/bam.lua b/bam.lua index 64c0bdcb1..8eabe65be 100644 --- a/bam.lua +++ b/bam.lua @@ -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")