summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-07-22 16:57:24 +0200
committerRémi Verschelde <rverschelde@gmail.com>2019-07-22 17:17:30 +0200
commit5dae2ea777da5395cf1b1e9a8bc6abc93f6ae6bb (patch)
treee53c5d2fbb3892e53352d5061710df8111262b4a /SConstruct
parentf03c1c8d4fcc5758be84ce114c1b4f7990a19aed (diff)
SCons: Enable C++11 on the whole codebase
**Important:** This does not mean *yet* that C++11 features should be used in contributions to Godot's codebase. For now this change is done solely for feature branches working on Vulkan support and GDScript typed instruction sets for Godot 4.0, which will both use C++11 features and are based on the master branch. The plan is to start porting the codebase to C++11 after Godot 3.2 is released, following upcoming guidelines on the subset of new features that should be used, and when/how to use them. We will advertise clearly when C++11 contributions are open, especially once we start a coordinated effort to port Godot's massive codebase. In the meantime, please bear with us and good ol' C++03. :)
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct4
1 files changed, 4 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 92dc4d9da2..aa5e3a98c8 100644
--- a/SConstruct
+++ b/SConstruct
@@ -311,6 +311,10 @@ if selected_platform in platform_list:
# must happen after the flags, so when flags are used by configure, stuff happens (ie, ssl on x11)
detect.configure(env)
+ # Enable C++11 support
+ if not env.msvc:
+ env.Append(CXXFLAGS=['-std=c++11'])
+
# Configure compiler warnings
if env.msvc:
# Truncations, narrowing conversions, signed/unsigned comparisons...