Fix for better icc + openmp support using scons
authorDaniel Genrich <daniel.genrich@gmx.net>
Mon, 4 Aug 2008 17:24:11 +0000 (17:24 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Mon, 4 Aug 2008 17:24:11 +0000 (17:24 +0000)
SConstruct

index 869ba6454c81394fa515a6209c92a63f43b1499a..4c3bbf8fad7179b85152d47b24fcbbecf8b129fc 100644 (file)
@@ -184,15 +184,16 @@ if env['WITH_BF_OPENMP'] == 1:
                 env['CPPFLAGS'].append('/openmp')
                 env['CXXFLAGS'].append('/openmp')
         else:
-            if env['CC'] == 'icc':
+            if env['CC'][-3:] == 'icc': # to be able to handle CC=/opt/bla/icc case
                 env.Append(LINKFLAGS=['-openmp', '-static-intel'])
                 env['CCFLAGS'].append('-openmp')
                 env['CPPFLAGS'].append('-openmp')
                 env['CXXFLAGS'].append('-openmp')
             else:
-                env['CCFLAGS'].append('-fopenmp')
-                env['CPPFLAGS'].append('-fopenmp')
-                env['CXXFLAGS'].append('-fopenmp')
+                env.Append(CCFLAGS=['-fopenmp']) 
+                env.Append(CPPFLAGS=['-fopenmp'])
+                env.Append(CXXFLAGS=['-fopenmp'])
+                # env.Append(LINKFLAGS=['-fprofile-generate'])
 
 #check for additional debug libnames