get_fpm_env Function

public function get_fpm_env(env, default) result(val)

Get an environment variable for fpm, this routine ensures that every variable used by fpm is prefixed with FPM_.

Arguments

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

Return Value character(len=:), allocatable


Source Code

    function get_fpm_env(env, default) result(val)
      character(len=*), intent(in) :: env
      character(len=*), intent(in) :: default
      character(len=:), allocatable :: val

      character(len=*), parameter :: fpm_prefix = "FPM_"

      val = get_env(fpm_prefix//env, default)
    end function get_fpm_env