Enforce C++17 in some left out build configs on mac

This commit is contained in:
Twarit Waikar
2021-04-19 18:11:31 +05:30
parent 0c6017066f
commit 57cd5cc068
2 changed files with 4 additions and 4 deletions

View File

@@ -59,7 +59,7 @@ jobs:
run: |
brew install scons
. ./build_libs_mac.sh Debug
scons platform=osx target=debug
scons platform=osx target=debug use_llvm=yes
build-release-macos:
runs-on: macos-latest
@@ -69,4 +69,4 @@ jobs:
run: |
brew install scons
. ./build_libs_mac.sh Release
scons platform=osx target=release
scons platform=osx target=release use_llvm=yes

View File

@@ -45,7 +45,7 @@ if env['platform'] == "osx":
cpp_library += '.osx'
libgit2_lib_path += 'osx/'
if env['target'] in ('debug', 'd'):
env.Append(CCFLAGS = ['-g','-O2', '-arch', 'x86_64'])
env.Append(CCFLAGS = ['-g','-O2', '-arch', 'x86_64', '-std=c++17'])
env.Append(LINKFLAGS = ['-arch', 'x86_64'])
else:
env.Append(CCFLAGS = ['-g','-O3', '-arch', 'x86_64', '-std=c++17'])
@@ -68,7 +68,7 @@ elif env['platform'] == "windows":
# that way you can run scons in a vs 2017 prompt and it will find all the required tools
env.Append(ENV = os.environ)
env.Append(CCFLAGS = ['-DWIN32', '-D_WIN32', '-D_WINDOWS', '-W3', '-GR', '-D_CRT_SECURE_NO_WARNINGS'])
env.Append(CCFLAGS = ['-DWIN32', '-D_WIN32', '-D_WINDOWS', '-W3', '-GR', '-D_CRT_SECURE_NO_WARNINGS', '/std:c++17'])
env.Append(LIBS=['Advapi32'])
if env['target'] in ('debug', 'd'):
env.Append(CCFLAGS = ['-EHsc', '-D_DEBUG', '-MDd'])