Bugfix for wrong OpenMP flags when using icc (proposed by jensverwiebe via IRC)
authorDaniel Genrich <daniel.genrich@gmx.net>
Wed, 5 Mar 2008 14:58:33 +0000 (14:58 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Wed, 5 Mar 2008 14:58:33 +0000 (14:58 +0000)
SConstruct

index efb8ae6d219914b3a345ed58a6aa9deec1366abe..3ee56f7cff1fe322f234e81d9b592cb5dcabf014 100644 (file)
@@ -185,10 +185,16 @@ if env['WITH_BF_OPENMP'] == 1:
                env['CPPFLAGS'].append('/openmp')
                env['CXXFLAGS'].append('/openmp')
        else:
-               env.Append(LINKFLAGS=['-lgomp'])
-               env['CCFLAGS'].append('-fopenmp')
-               env['CPPFLAGS'].append('-fopenmp')
-               env['CXXFLAGS'].append('-fopenmp')
+               if env['CC'] == 'icc':
+                       env.Append(LINKFLAGS=['-openmp', '-static-intel'])
+                       env['CCFLAGS'].append('-openmp')
+                       env['CPPFLAGS'].append('-openmp')
+                       env['CXXFLAGS'].append('-openmp')
+               else:
+                       env.Append(LINKFLAGS=['-lgomp'])
+                       env['CCFLAGS'].append('-fopenmp')
+                       env['CPPFLAGS'].append('-fopenmp')
+                       env['CXXFLAGS'].append('-fopenmp')
 
 #check for additional debug libnames