2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2025-01-27 10:40:02 +01:00
This commit is contained in:
Thomas Nagy 2011-10-26 22:09:30 +02:00
parent 9fbfadd6d8
commit 3f0b96ee7a

View File

@ -441,3 +441,21 @@ def set_lib_pat(self):
"""Set the fortran flags for linking with the python library"""
self.env['fcshlib_PATTERN'] = self.env['pyext_PATTERN']
@conf
def detect_openmp(self):
for x in ['-fopenmp','-openmp','-mp','-xopenmp','-omp','-qsmp=omp']:
try:
conf.check_fc(
msg='Checking for OpenMP flag %s' % x,
fragment='program main\n call omp_get_num_threads()\nend program main',
fcflags=x,
linkflags=x,
uselib_store='OPENMP'
)
except conf.errors.ConfigurationError:
pass
else:
break
else:
conf.fatal('Could not find OpenMP')