Fortran configuration helpers
Configuration Method bound to waflib.Configure.ConfigurationContext
Defines common fortran configuration flags and file extensions
Configuration Method bound to waflib.Configure.ConfigurationContext
Adds FCFLAGS / LDFLAGS / LINKFLAGS from os.environ to conf.env
Configuration Method bound to waflib.Configure.ConfigurationContext
Compiles a Fortran program to ensure that the settings are correct
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 in waflib.Tools.c_config.validate_c())
Configuration Method bound to waflib.Configure.ConfigurationContext
Defines Fortran flags and extensions for OSX systems
Configuration Method bound to waflib.Configure.ConfigurationContext
Defines Fortran flags for Windows platforms
Configuration Method bound to waflib.Configure.ConfigurationContext
Defines Fortran flags for use on cygwin
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)
Configuration Method bound to waflib.Configure.ConfigurationContext Returns True if ‘useful’ link options can be found in txt
Configuration Method bound to waflib.Configure.ConfigurationContext
Checks what kind of verbose (-v) flag works, then sets it to env.FC_VERBOSE_FLAG
Returns True if the line should be ignored (Fortran verbose flag test)
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
Obtains the flags for linking with the C library if this check works, add uselib=’CLIB’ to your task generators
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
Detects openmp flags and sets the OPENMP FCFLAGS/LINKFLAGS
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 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 |
---|
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: