Check if compiler name is a valid compiler name
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=:), | intent(in), | allocatable | :: | compiler_name |
Name of a compiler |
|
logical, | intent(out) | :: | is_valid |
Boolean value of whether compiler_name is valid or not |
subroutine validate_compiler_name(compiler_name, is_valid)
!> Name of a compiler
character(len=:), allocatable, intent(in) :: compiler_name
!> Boolean value of whether compiler_name is valid or not
logical, intent(out) :: is_valid
select case(compiler_name)
case("gfortran", "ifort", "ifx", "pgfortran", "nvfortran", "flang", "caf", &
& "f95", "lfortran", "lfc", "nagfor", "crayftn", "xlf90", "ftn95")
is_valid = .true.
case default
is_valid = .false.
end select
end subroutine validate_compiler_name