1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

SCons: Explicitly define our C (C11) and C++ (C++14) standards

On GCC and Clang, we use C11 and C++14 with GNU extensions (`std=gnu11`
and `std=gnu++14`). Those are the defaults for current GCC and Clang,
and also match the feature sets we want to use in Godot.

On MSVC, we require C++14 support explicitly with `/std:c++14`, and
make it strict with the use of `/permissive-` (so features of C++17 or
later can't be used).

Moves the definition before querying environment flags and platform
config so that it can be overridden when necessary.

(cherry picked from commit 342f127362)
This commit is contained in:
Rémi Verschelde
2020-02-20 11:09:20 +01:00
parent 1350c1371e
commit c34b351b24
2 changed files with 15 additions and 4 deletions

View File

@@ -205,7 +205,6 @@ def configure(env):
env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++/include"])
env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++abi/include"])
env.Append(CXXFLAGS=["-std=gnu++14"])
# Disable exceptions and rtti on non-tools (template) builds
if env['tools']: