mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-26 03:39:53 +01:00
Merge branch 'master' of https://code.google.com/p/waf
This commit is contained in:
commit
da41aac8c0
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*.pyc
|
||||
waf
|
@ -5,6 +5,7 @@ NEW IN WAF 1.6.9
|
||||
* Added a workaround to avoid creating include folders not under the build directory #1049
|
||||
* Added a default virtual folder structure for out-of-tree build files #1053
|
||||
* Added a way to set variants containing /, for example linux/debug
|
||||
* Added a more intuitive behaviour for conf.setenv() #1062
|
||||
|
||||
NEW IN WAF 1.6.8
|
||||
----------------
|
||||
|
@ -111,7 +111,8 @@ class ConfigurationContext(Context.Context):
|
||||
|
||||
def setenv(self, name, env=None):
|
||||
"""
|
||||
Set a new config set for conf.env
|
||||
Set a new config set for conf.env. If a config set of that name already exists,
|
||||
recall it without modification.
|
||||
|
||||
The name is the filename prefix to save to ``c4che/NAME_cache.py``, and it
|
||||
is also used as *variants* by the build commands.
|
||||
@ -130,12 +131,13 @@ class ConfigurationContext(Context.Context):
|
||||
:param env: ConfigSet to copy, or an empty ConfigSet is created
|
||||
:type env: :py:class:`waflib.ConfigSet.ConfigSet`
|
||||
"""
|
||||
if not env:
|
||||
env = ConfigSet.ConfigSet()
|
||||
self.prepare_env(env)
|
||||
else:
|
||||
env = env.derive()
|
||||
self.all_envs[name] = env
|
||||
if name not in self.all_envs or env:
|
||||
if not env:
|
||||
env = ConfigSet.ConfigSet()
|
||||
self.prepare_env(env)
|
||||
else:
|
||||
env = env.derive()
|
||||
self.all_envs[name] = env
|
||||
self.variant = name
|
||||
|
||||
def get_env(self):
|
||||
|
@ -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')
|
||||
|
||||
|
@ -19,6 +19,14 @@ def find_ifort(conf):
|
||||
def ifort_modifier_cygwin(conf):
|
||||
raise NotImplementedError("Ifort on cygwin not yet implemented")
|
||||
|
||||
@conf
|
||||
def ifort_modifier_win32(conf):
|
||||
fc_config.fortran_modifier_win32(conf)
|
||||
|
||||
@conf
|
||||
def ifort_modifier_darwin(conf):
|
||||
fc_config.fortran_modifier_darwin(conf)
|
||||
|
||||
@conf
|
||||
def ifort_modifier_platform(conf):
|
||||
dest_os = conf.env['DEST_OS'] or Utils.unversioned_sys_platform()
|
||||
@ -47,3 +55,4 @@ def configure(conf):
|
||||
conf.find_ar()
|
||||
conf.fc_flags()
|
||||
conf.ifort_modifier_platform()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user