mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-27 06:19:30 +00:00
scons: add option to enable using c++14 features
This commit is contained in:
parent
982394fe3a
commit
bb02ce7c72
@ -103,6 +103,7 @@ opts.AddVariables(
|
|||||||
BoolVariable('ccache', "Use ccache", False),
|
BoolVariable('ccache', "Use ccache", False),
|
||||||
('ctool', 'Set c compiler command if not using standard compiler.'),
|
('ctool', 'Set c compiler command if not using standard compiler.'),
|
||||||
('cxxtool', 'Set c++ compiler command if not using standard compiler.'),
|
('cxxtool', 'Set c++ compiler command if not using standard compiler.'),
|
||||||
|
EnumVariable('cxx_std', 'Target c++ std version', '11', ['11', '14']),
|
||||||
BoolVariable('openmp', 'Enable openmp use.', False),
|
BoolVariable('openmp', 'Enable openmp use.', False),
|
||||||
BoolVariable("fast", "Make scons faster at cost of less precise dependency tracking.", False),
|
BoolVariable("fast", "Make scons faster at cost of less precise dependency tracking.", False),
|
||||||
BoolVariable("lockfile", "Create a lockfile to prevent multiple instances of scons from being run at the same time on this working copy.", False),
|
BoolVariable("lockfile", "Create a lockfile to prevent multiple instances of scons from being run at the same time on this working copy.", False),
|
||||||
@ -500,7 +501,7 @@ for env in [test_env, client_env, env]:
|
|||||||
if "gcc" in env["TOOLS"]:
|
if "gcc" in env["TOOLS"]:
|
||||||
env.AppendUnique(CCFLAGS = Split("-W -Wall"), CFLAGS = ["-std=c99"])
|
env.AppendUnique(CCFLAGS = Split("-W -Wall"), CFLAGS = ["-std=c99"])
|
||||||
|
|
||||||
env.AppendUnique(CXXFLAGS = "-std=c++11")
|
env.AppendUnique(CXXFLAGS = "-std=c++" + env["cxx_std"])
|
||||||
env.Append(CPPDEFINES = "HAVE_CXX0X")
|
env.Append(CPPDEFINES = "HAVE_CXX0X")
|
||||||
|
|
||||||
if env['openmp']:
|
if env['openmp']:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user