match_os_type Function

public function match_os_type(os_name) result(os_type)

Match os_name to os_type enum (similar to profiles.f90)

Arguments

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

Return Value integer


Source Code

    integer function match_os_type(os_name) result(os_type)
        character(len=*), intent(in) :: os_name
        
        select case (lower(os_name))
            case ("linux");   os_type = OS_LINUX
            case ("macos");   os_type = OS_MACOS
            case ("windows"); os_type = OS_WINDOWS
            case ("cygwin");  os_type = OS_CYGWIN
            case ("solaris"); os_type = OS_SOLARIS
            case ("freebsd"); os_type = OS_FREEBSD
            case ("openbsd"); os_type = OS_OPENBSD
            case ("all");     os_type = OS_ALL
            case default;     os_type = OS_UNKNOWN
        end select
    end function match_os_type