This module implements subroutines for building a list of
[[srcfile_t]] objects by looking for source files in the filesystem.
Add one or multiple source files to a source file array (gcc-15 bug workaround)
Add one source file to a source file array with a loop (gcc-15 bug on array initializer)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(srcfile_t), | intent(inout), | allocatable | :: | list(:) | ||
| type(srcfile_t), | intent(in) | :: | new |
Add multiple source files to a source file array with a loop (gcc-15 bug on array initializer)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(srcfile_t), | intent(inout), | allocatable | :: | list(:) | ||
| type(srcfile_t), | intent(in) | :: | new(:) |
Build an executable name with suffix. Safe routine that always returns an allocated string
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(srcfile_t), | intent(in) | :: | source |
Add to sources using the executable and test entries in the manifest and
applies any executable-specific overrides such as executable%name.
Adds all sources (including modules) from each executable%source_dir
Compare lowercase strings to allow auto-discovery of pre-processed extensions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(srcfile_t), | intent(inout), | allocatable, target | :: | sources(:) |
List of |
|
| class(executable_config_t), | intent(in) | :: | executables(:) |
List of |
||
| integer, | intent(in) | :: | scope |
Scope to apply to the discovered sources: either |
||
| logical, | intent(in) | :: | auto_discover |
If |
||
| type(string_t), | intent(in), | optional | :: | with_f_ext(:) |
Additional user-defined (preprocessor) extensions that should be treated as Fortran sources |
|
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
|
| type(preprocess_config_t), | intent(in), | optional | :: | preprocess |
Optional source preprocessor configuration |
Add to sources by looking for source files in directory
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(srcfile_t), | intent(inout), | allocatable, target | :: | sources(:) |
List of |
|
| character(len=*), | intent(in) | :: | directory |
Directory in which to search for source files |
||
| integer, | intent(in) | :: | scope |
Scope to apply to the discovered sources, see fpm_model for enumeration |
||
| logical, | intent(in), | optional | :: | with_executables |
Executable sources (fortran |
|
| type(string_t), | intent(in), | optional | :: | with_f_ext(:) |
Additional user-defined (preprocessor) extensions that should be treated as Fortran sources |
|
| logical, | intent(in), | optional | :: | recurse |
Whether to recursively search subdirectories, default is |
|
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
|
| type(preprocess_config_t), | intent(in), | optional | :: | preprocess |
Optional source preprocessor configuration |