13
0

Allow to explicitly request C++11/17

This commit is contained in:
Robin Gareus 2024-09-15 00:14:51 +02:00
parent 098cd721d3
commit e299635511
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

10
wscript
View File

@ -566,10 +566,16 @@ int main() { return 0; }''',
cxx_flags.append('--stdlib=libc++')
linker_flags.append('--stdlib=libc++')
if conf.options.cxx17 or conf.env['build_host'] in [ 'bigsur', 'monterey', 'ventura', 'sonoma' ]:
if conf.options.cxx17:
conf.check_cxx(cxxflags=["-std=c++17"])
cxx_flags.append('-std=c++17')
elif conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]:
elif conf.options.cxx11:
conf.check_cxx(cxxflags=["-std=c++11"])
cxx_flags.append('-std=c++11')
elif conf.env['build_host'] in [ 'bigsur', 'monterey', 'ventura', 'sonoma' ]:
conf.check_cxx(cxxflags=["-std=c++17"])
cxx_flags.append('-std=c++17')
elif conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]:
conf.check_cxx(cxxflags=["-std=c++11"])
cxx_flags.append('-std=c++11')