Fortran configuration helpers
Configuration Method bound to waflib.Configure.ConfigurationContext
Define common fortran configuration flags and file extensions
Configuration Method bound to waflib.Configure.ConfigurationContext See if the fortran compiler works by compiling a simple fortran program
Configuration Method bound to waflib.Configure.ConfigurationContext
Same as waflib.Tools.c_config.check() but default to the Fortran programming language (Overriding the C defaults in waflib.Tools.c_config.validate_c() here)
Configuration Method bound to waflib.Configure.ConfigurationContext
Define fortran flags and extensions for the OSX systems
Configuration Method bound to waflib.Configure.ConfigurationContext Define fortran flags for the windows platforms
Configuration Method bound to waflib.Configure.ConfigurationContext Define fortran flags for use on cygwin
Configuration Method bound to waflib.Configure.ConfigurationContext
Guess if a main function is needed by compiling a code snippet with the C compiler and link with the Fortran compiler
TODO: (DC) - handling dialects (F77, F90, etc... -> needs core support first) - fix dummy main check (AC_FC_DUMMY_MAIN vs AC_FC_MAIN)
TODO: what does the above mean? (ita)
Configuration Method bound to waflib.Configure.ConfigurationContext Return True if ‘useful’ link options can be found in txt
Configuration Method bound to waflib.Configure.ConfigurationContext
Check what kind of verbose (-v) flag works, then set it to env.FC_VERBOSE_FLAG
Returns True if the line should be ignored (fortran test for verbosity).
Given the output of verbose link of Fortran compiler, this returns a list of flags necessary for linking using the standard linker.
Configuration Method bound to waflib.Configure.ConfigurationContext
Obtain the flags for linking with the C library if this check works, add uselib=’CLIB’ to your task generators
TODO a bit redundant, can be removed anytime
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 |
---|
Generate triplets for use with mangle_name (used in check_fortran_mangling) the order is tuned for gfortan
Mangle a name from a triplet (used in check_fortran_mangling)
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
Task generator method
feature: | pyext |
---|
Configuration Method bound to waflib.Configure.ConfigurationContext
Decorator: attach new configuration functions to waflib.Build.BuildContext and waflib.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 |
---|
Decorator: register 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 |
---|
Decorator: register a 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 |
---|
Decorator: register a task generator method which will be executed after the functions of given name(s):
from waflib.TaskGen import feature, after
@feature('myfeature')
@after_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: