ecbuild_generate_fortran_interfaces

Generates interfaces from Fortran source files.

ecbuild_generate_fortran_interfaces( TARGET <name>
                                     DESTINATION <path>
                                     DIRECTORIES <directory1> [<directory2> ...]
                                     [ 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_DIR to install target to

DIRECTORIESrequired

list of directories in SOURCE_DIR in which to search for Fortran files to 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 given as arguments to DIRECTORIES

SUFFIXoptional, defaults to “.intfb.h”

suffix to apply to name of each interface file

FCM_CONFIG_FILEoptional, defaults to the fcm-make-interfaces.cfg file in the ecbuild project

FCM configuration file to be used to generate interfaces

Usage

The listed directories will be recursively searched for Fortran files of the form <fname>.[fF], <fname>.[fF]90, <fname>.[fF]03 or <fname>.[fF]08. 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.