functionpreprocessor_commandprivate
character(len=:) function preprocessor_command(s, path) result(command)
The preprocessor command for path. FORD's default of pcpp is Python, so it is replaced.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| s | type(settings_t) | in | the settings | |
| path | character(len=*) | in | the file |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| command | character(len=:) | privateallocatable |
Calls
Source
Show the code
function preprocessor_command(s, path) result(command)
type(settings_t), intent(in) :: s !! the settings
character(len=*), intent(in) :: path !! the file
character(len=:), allocatable :: command
integer :: k
command = s%preprocessor
if (starts_word(command, 'pcpp')) command = 'gfortran -E -cpp -D__GFORTRAN__'
do k = 1, size(s%macro)
if (len(strip(s%macro(k)%s)) > 0) command = command//' '//quoted('-D'//strip(s%macro(k)%s))
end do
do k = 1, size(s%include)
command = command//' '//quoted('-I'//s%include(k)%s)
end do
command = command//' '//quoted_path(path)
end function preprocessor_command