fc_config¶
Fortran configuration helpers
-
waflib.Tools.fc_config.
fc_flags
(conf)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Defines common fortran configuration flags and file extensions
-
waflib.Tools.fc_config.
fc_add_flags
(conf)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Adds FCFLAGS / LDFLAGS / LINKFLAGS from os.environ to conf.env
-
waflib.Tools.fc_config.
check_fortran
(self, *k, **kw)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Compiles a Fortran program to ensure that the settings are correct
-
waflib.Tools.fc_config.
check_fc
(self, *k, **kw)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Same as
waflib.Tools.c_config.check()
but defaults to the Fortran programming language (this overrides the C defaults inwaflib.Tools.c_config.validate_c()
)
-
waflib.Tools.fc_config.
fortran_modifier_darwin
(conf)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Defines Fortran flags and extensions for OSX systems
-
waflib.Tools.fc_config.
fortran_modifier_win32
(conf)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Defines Fortran flags for Windows platforms
-
waflib.Tools.fc_config.
fortran_modifier_cygwin
(conf)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Defines Fortran flags for use on cygwin
-
waflib.Tools.fc_config.
check_fortran_dummy_main
(self, *k, **kw)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Determines if a main function is needed by compiling a code snippet with the C compiler and linking it with the Fortran compiler (useful on unix-like systems)
-
waflib.Tools.fc_config.
is_link_verbose
(self, txt)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Returns True if ‘useful’ link options can be found in txt
-
waflib.Tools.fc_config.
check_fortran_verbose_flag
(self, *k, **kw)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Checks what kind of verbose (-v) flag works, then sets it to env.FC_VERBOSE_FLAG
-
waflib.Tools.fc_config.
_match_ignore
(line)[source]¶ Returns True if the line should be ignored (Fortran verbose flag test)
-
waflib.Tools.fc_config.
parse_fortran_link
(lines)[source]¶ Given the output of verbose link of Fortran compiler, this returns a list of flags necessary for linking using the standard linker.
-
waflib.Tools.fc_config.
check_fortran_clib
(self, autoadd=True, *k, **kw)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Obtains the flags for linking with the C library if this check works, add uselib=’CLIB’ to your task generators
-
waflib.Tools.fc_config.
link_main_routines_tg_method
(self)[source]¶ Task generator method
The configuration test declares a unique task generator, so we create other task generators from there for fortran link tests
Feature: link_main_routines_func
-
waflib.Tools.fc_config.
mangling_schemes
()[source]¶ Generate triplets for use with mangle_name (used in check_fortran_mangling) the order is tuned for gfortan
-
waflib.Tools.fc_config.
mangle_name
(u, du, c, name)[source]¶ Mangle a name from a triplet (used in check_fortran_mangling)
-
waflib.Tools.fc_config.
check_fortran_mangling
(self, *k, **kw)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Detect the mangling scheme, sets FORTRAN_MANGLING to the triplet found
This test will compile a fortran static library, then link a c app against it
-
waflib.Tools.fc_config.
set_lib_pat
(self)[source]¶ Task generator method
- Sets the Fortran flags for linking with Python
feature: pyext
-
waflib.Tools.fc_config.
detect_openmp
(self)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
Detects openmp flags and sets the OPENMP
FCFLAGS
/LINKFLAGS
-
waflib.Tools.fc_config.
check_gfortran_o_space
(self)[source]¶ Configuration Method bound to
waflib.Configure.ConfigurationContext
-
waflib.Tools.fc_config.
conf
(f)¶ Decorator: attach new configuration functions to
waflib.Build.BuildContext
andwaflib.Configure.ConfigurationContext
. The methods bound will accept a parameter named ‘mandatory’ to disable the configuration errors:def configure(conf): conf.find_program('abc', mandatory=False)
Parameters: f (function) – method to bind
-
waflib.Tools.fc_config.
feature
(*k)¶ Decorator that registers a task generator method that will be executed when the object attribute
feature
contains the corresponding key(s):from waflib.Task import feature @feature('myfeature') def myfunction(self): print('that is my feature!') def build(bld): bld(features='myfeature')
Parameters: k (list of string) – feature names
-
waflib.Tools.fc_config.
before_method
(*k)[source]¶ Decorator that registera task generator method which will be executed before the functions of given name(s):
from waflib.TaskGen import feature, before @feature('myfeature') @before_method('fun2') def fun1(self): print('feature 1!') @feature('myfeature') def fun2(self): print('feature 2!') def build(bld): bld(features='myfeature')
Parameters: k (list of string) – method names
Features defined in this module: