Author: loonycyborg
Date: Mon Feb 28 23:47:44 2011
New Revision: 48689

URL: http://svn.gna.org/viewcvs/wesnoth?rev=48689&view=rev
Log:
Added a scons option to enable openmp support using gcc's GOMP

openmp=true to enable.

Modified:
    trunk/SConstruct

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=48689&r1=48688&r2=48689&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Mon Feb 28 23:47:44 2011
@@ -99,6 +99,7 @@
     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 @@
         else:
             env.AppendUnique(CXXFLAGS = "-std=c++98")
 
+        if env['openmp']:
+            env.AppendUnique(CXXFLAGS = ["-fopenmp"], LIBS = ["gomp"])
+
         if env['strict']:
             env.AppendUnique(CCFLAGS = Split("-Werror"))
 


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to