diff options
Diffstat (limited to 'src/fpm_environment.f90')
-rw-r--r-- | src/fpm_environment.f90 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/fpm_environment.f90 b/src/fpm_environment.f90 index 7926703..33a584b 100644 --- a/src/fpm_environment.f90 +++ b/src/fpm_environment.f90 @@ -14,6 +14,7 @@ module fpm_environment public :: get_env public :: get_command_arguments_quoted public :: separator + public :: os_is_32bit_windows integer, parameter, public :: OS_UNKNOWN = 0 integer, parameter, public :: OS_LINUX = 1 @@ -155,6 +156,24 @@ contains end if unix = build_os /= OS_WINDOWS end function os_is_unix + + logical function os_is_32bit_windows(os) result(win_32bit) + use fpm_os, only: windows_is_wow64 + implicit none + integer, intent(in), optional :: os + integer :: build_os + if (present(os)) then + build_os = os + else + build_os = get_os_type() + end if + + if(build_os == OS_WINDOWS) then + win_32bit = .not. windows_is_wow64() + else + win_32bit = .false. + end if + end function os_is_32bit_windows !> get named environment variable value. It it is blank or !! not set return the optional default value |