identify_compiler Function

public function identify_compiler(compiler) result(id)

Identify a compiler from its name, and for a compiler named like LLVM flang, from its installation: AOCC, like other classic flang installs, also calls its compiler flang

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: compiler

Return Value integer(kind=compiler_enum)


Source Code

function identify_compiler(compiler) result(id)
    character(len=*), intent(in) :: compiler
    integer(kind=compiler_enum) :: id

    id = match_compiler_type(compiler)
    if (id == id_flang) then
        if (is_classic_flang(compiler)) id = id_flang_classic
    end if

end function identify_compiler