fdoc

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

NameTypeIntentAttributesDescription
stype(settings_t)in

the settings

pathcharacter(len=*)in

the file

Result

NameTypeAttributesDescription
commandcharacter(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

Graphs

Calls

Called by