ecbuild_generate_fortran_interfaces
Generates interfaces from Fortran source files.
ecbuild_generate_fortran_interfaces( TARGET <name>
DESTINATION <path>
{ DIRECTORIES <directory1> [<directory2> ...] | FILES <file1> [<file2> ...] }
[ PARALLEL <integer> ]
[ INCLUDE_DIRS <name> ]
[ GENERATED <name> ]
[ SOURCE_DIR <path> ]
[ SUFFIX <suffix> ]
[ FCM_CONFIG_FILE <file> ]
)
Options
- TARGETrequired
target name
- DESTINATIONrequired
sub-directory of
CMAKE_CURRENT_BINARY_DIRto install target to- DIRECTORIES | FILESrequired
- list of directories in
SOURCE_DIRin which to search for Fortran files to be processed, orlist of Fortran files inSOURCE_DIRto be processed - PARALLELoptional, defaults to 1
number of processes to use (always 1 on Darwin systems)
- INCLUDE_DIRSoptional
name of CMake variable to store the path to the include directory containing the resulting interfaces
- GENERATEDoptional
name of CMake variable to store the list of generated interface files, including the full path to each
- SOURCE_DIRoptional, defaults to
CMAKE_CURRENT_SOURCE_DIR directory in which to look for the sub-directories or source files given as arguments to
DIRECTORIESorFILES- SUFFIXoptional, defaults to “.intfb.h”
suffix to apply to name of each interface file
- FCM_CONFIG_FILEoptional, defaults to the
fcm-make-interfaces.cfgfile in the ecbuild project FCM configuration file to be used to generate interfaces
Usage
Given a list of directories, they will be recursively searched for Fortran
files of the form <fname>.[fF], <fname>.[fF]90, <fname>.[fF]03 or
<fname>.[fF]08. Given a list of files, these must be an exact match and
contained within SOURCE_DIR. Either DIRECTORIES or FILES (or
both) must be provided. For each matching file, a file <fname><suffix>
will be created containing the interface blocks for all external subprograms
within it, where <suffix> is the value given to the SUFFIX option. If
a file contains no such subprograms, no interface file will be generated for
it.