Merge pull request #36457 from akien-mga/c++-standard-gnu++17
SCons: Bump required C++ standard to C++17
This commit is contained in:
commit
9a55f1564c
19
.travis.yml
19
.travis.yml
|
@ -1,7 +1,7 @@
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
# OS config, depends on actual 'os' in build matrix
|
# OS config, depends on actual 'os' in build matrix
|
||||||
dist: xenial
|
dist: bionic
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
|
@ -26,8 +26,6 @@ matrix:
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
|
||||||
- llvm-toolchain-xenial-8
|
|
||||||
packages:
|
packages:
|
||||||
- clang-format-8
|
- clang-format-8
|
||||||
|
|
||||||
|
@ -39,14 +37,15 @@ matrix:
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- mono
|
- sourceline: "deb https://download.mono-project.com/repo/ubuntu stable-bionic main"
|
||||||
- ubuntu-toolchain-r-test
|
key_url: "https://raw.githubusercontent.com/travis-ci/apt-source-safelist/master/keys/mono.asc"
|
||||||
|
- sourceline: "ppa:ubuntu-toolchain-r/test"
|
||||||
packages:
|
packages:
|
||||||
- &gcc9_deps [gcc-9, g++-9]
|
- &gcc9_deps [gcc-9, g++-9]
|
||||||
- &linux_deps [libasound2-dev, libgl1-mesa-dev, libglu1-mesa-dev, libx11-dev, libxcursor-dev, libxi-dev, libxinerama-dev, libxrandr-dev]
|
- &linux_deps [libasound2-dev, libgl1-mesa-dev, libglu1-mesa-dev, libx11-dev, libxcursor-dev, libxi-dev, libxinerama-dev, libxrandr-dev]
|
||||||
- &linux_mono_deps [mono-devel, msbuild, nuget]
|
- &linux_mono_deps [mono-devel, msbuild, nuget]
|
||||||
|
|
||||||
- name: Linux export template (release, Clang)
|
- name: Linux export template (release, Clang 7)
|
||||||
stage: build
|
stage: build
|
||||||
env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
|
env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
|
||||||
os: linux
|
os: linux
|
||||||
|
@ -101,14 +100,14 @@ matrix:
|
||||||
# addons:
|
# addons:
|
||||||
# apt:
|
# apt:
|
||||||
# sources:
|
# sources:
|
||||||
# - ubuntu-toolchain-r-test
|
# - sourceline: "ppa:ubuntu-toolchain-r/test"
|
||||||
# packages:
|
# packages:
|
||||||
# - *gcc9_deps
|
# - *gcc9_deps
|
||||||
# - *linux_deps
|
# - *linux_deps
|
||||||
|
|
||||||
- name: Linux export template (release_debug, GCC 5, without 3D support)
|
- name: Linux export template (release_debug, GCC 7, without 3D support)
|
||||||
stage: build
|
stage: build
|
||||||
env: PLATFORM=x11 TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-5 EXTRA_ARGS="CXXFLAGS=-fno-strict-aliasing disable_3d=yes"
|
env: PLATFORM=x11 TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-7 EXTRA_ARGS="disable_3d=yes"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
addons:
|
addons:
|
||||||
|
@ -124,7 +123,7 @@ before_install:
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||||
pyenv global 3.7.1 system;
|
pyenv global 3.7.5 system;
|
||||||
pip3 install --user scons;
|
pip3 install --user scons;
|
||||||
fi
|
fi
|
||||||
- scons --version
|
- scons --version
|
||||||
|
|
10
SConstruct
10
SConstruct
|
@ -310,17 +310,17 @@ if selected_platform in platform_list:
|
||||||
env.Append(LINKFLAGS=str(LINKFLAGS).split())
|
env.Append(LINKFLAGS=str(LINKFLAGS).split())
|
||||||
|
|
||||||
# Set our C and C++ standard requirements.
|
# Set our C and C++ standard requirements.
|
||||||
# Prepending to make it possible to override
|
# C++17 is required as we need guaranteed copy elision as per GH-36436.
|
||||||
|
# Prepending to make it possible to override.
|
||||||
if not env.msvc:
|
if not env.msvc:
|
||||||
# Specifying GNU extensions support explicitly, which are supported by
|
# Specifying GNU extensions support explicitly, which are supported by
|
||||||
# both GCC and Clang. This mirrors GCC and Clang's current default
|
# both GCC and Clang. Both currently default to gnu11 and gnu++14.
|
||||||
# compile flags if no -std is specified.
|
|
||||||
env.Prepend(CFLAGS=['-std=gnu11'])
|
env.Prepend(CFLAGS=['-std=gnu11'])
|
||||||
env.Prepend(CXXFLAGS=['-std=gnu++14'])
|
env.Prepend(CXXFLAGS=['-std=gnu++17'])
|
||||||
else:
|
else:
|
||||||
# MSVC doesn't have clear C standard support, /std only covers C++.
|
# MSVC doesn't have clear C standard support, /std only covers C++.
|
||||||
# We apply it to CCFLAGS (both C and C++ code) in case it impacts C features.
|
# We apply it to CCFLAGS (both C and C++ code) in case it impacts C features.
|
||||||
env.Prepend(CCFLAGS=['/std:c++14', '/permissive-'])
|
env.Prepend(CCFLAGS=['/std:c++17', '/permissive-'])
|
||||||
|
|
||||||
# Platform specific flags
|
# Platform specific flags
|
||||||
flag_list = platform_flags[selected_platform]
|
flag_list = platform_flags[selected_platform]
|
||||||
|
|
|
@ -31,13 +31,13 @@
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>$copyright</string>
|
<string>$copyright</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.9.0</string>
|
<string>10.12.0</string>
|
||||||
<key>LSMinimumSystemVersionByArchitecture</key>
|
<key>LSMinimumSystemVersionByArchitecture</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>x86_64</key>
|
<key>x86_64</key>
|
||||||
<string>10.9.0</string>
|
<string>10.12.0</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>NSHighResolutionCapable</key>
|
<key>NSHighResolutionCapable</key>
|
||||||
$highres
|
$highres
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
4
misc/dist/osx_tools.app/Contents/Info.plist
vendored
4
misc/dist/osx_tools.app/Contents/Info.plist
vendored
|
@ -33,11 +33,11 @@
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>© 2007-2020 Juan Linietsky, Ariel Manzur & Godot Engine contributors</string>
|
<string>© 2007-2020 Juan Linietsky, Ariel Manzur & Godot Engine contributors</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.9.0</string>
|
<string>10.12.0</string>
|
||||||
<key>LSMinimumSystemVersionByArchitecture</key>
|
<key>LSMinimumSystemVersionByArchitecture</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>x86_64</key>
|
<key>x86_64</key>
|
||||||
<string>10.9.0</string>
|
<string>10.12.0</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>NSHighResolutionCapable</key>
|
<key>NSHighResolutionCapable</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
|
|
@ -164,5 +164,5 @@ def configure(env):
|
||||||
|
|
||||||
#env.Append(CPPDEFINES=['GLES_ENABLED', 'OPENGL_ENABLED'])
|
#env.Append(CPPDEFINES=['GLES_ENABLED', 'OPENGL_ENABLED'])
|
||||||
|
|
||||||
env.Append(CCFLAGS=['-mmacosx-version-min=10.11'])
|
env.Append(CCFLAGS=['-mmacosx-version-min=10.12'])
|
||||||
env.Append(LINKFLAGS=['-mmacosx-version-min=10.11'])
|
env.Append(LINKFLAGS=['-mmacosx-version-min=10.12'])
|
||||||
|
|
|
@ -747,7 +747,7 @@ static void _mouseDownEvent(NSEvent *event, int index, int mask, bool pressed) {
|
||||||
const Vector2 pos = get_mouse_pos([event locationInWindow], backingScaleFactor);
|
const Vector2 pos = get_mouse_pos([event locationInWindow], backingScaleFactor);
|
||||||
mm->set_position(pos);
|
mm->set_position(pos);
|
||||||
mm->set_pressure([event pressure]);
|
mm->set_pressure([event pressure]);
|
||||||
if ([event subtype] == NSTabletPointEventSubtype) {
|
if ([event subtype] == NSEventSubtypeTabletPoint) {
|
||||||
const NSPoint p = [event tilt];
|
const NSPoint p = [event tilt];
|
||||||
mm->set_tilt(Vector2(p.x, p.y));
|
mm->set_tilt(Vector2(p.x, p.y));
|
||||||
}
|
}
|
||||||
|
@ -1757,7 +1757,7 @@ void OS_OSX::alert(const String &p_alert, const String &p_title) {
|
||||||
[window addButtonWithTitle:@"OK"];
|
[window addButtonWithTitle:@"OK"];
|
||||||
[window setMessageText:ns_title];
|
[window setMessageText:ns_title];
|
||||||
[window setInformativeText:ns_alert];
|
[window setInformativeText:ns_alert];
|
||||||
[window setAlertStyle:NSWarningAlertStyle];
|
[window setAlertStyle:NSAlertStyleWarning];
|
||||||
|
|
||||||
// Display it, then release
|
// Display it, then release
|
||||||
[window runModal];
|
[window runModal];
|
||||||
|
|
Loading…
Reference in a new issue