Added a scons option to enable openmp support using gcc's GOMP
openmp=true to enable.
This commit is contained in:
parent
4e5bc535e3
commit
e57fbec3f5
1 changed files with 4 additions and 0 deletions
|
@ -99,6 +99,7 @@ opts.AddVariables(
|
|||
BoolVariable('ccache', "Use ccache", False),
|
||||
('cxxtool', 'Set c++ compiler command if not using standard compiler.'),
|
||||
BoolVariable('cxx0x', 'Use C++0x features.', False),
|
||||
BoolVariable('openmp', 'Enable openmp use.', 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)
|
||||
)
|
||||
|
@ -374,6 +375,9 @@ for env in [test_env, client_env, env]:
|
|||
else:
|
||||
env.AppendUnique(CXXFLAGS = "-std=c++98")
|
||||
|
||||
if env['openmp']:
|
||||
env.AppendUnique(CXXFLAGS = ["-fopenmp"], LIBS = ["gomp"])
|
||||
|
||||
if env['strict']:
|
||||
env.AppendUnique(CCFLAGS = Split("-Werror"))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue