diff options
author | Milan Curcic <caomaco@gmail.com> | 2021-04-29 20:28:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-29 20:28:39 -0400 |
commit | 7704c0063b70d2a8a0fbcb351dc470886f5802dc (patch) | |
tree | 79381521e65a2c85f99ea647f708eb5a596d994a /src/fpm_environment.f90 | |
parent | 7b53e5a39eda2c5ecbe6c99787c4a707d163d3ef (diff) | |
parent | bd347aab82173186c10b681d7d99399c15d9db18 (diff) | |
download | fpm-7704c0063b70d2a8a0fbcb351dc470886f5802dc.tar.gz fpm-7704c0063b70d2a8a0fbcb351dc470886f5802dc.zip |
Merge pull request #468 from ibara/openbsd
Identify OpenBSD.
Diffstat (limited to 'src/fpm_environment.f90')
-rw-r--r-- | src/fpm_environment.f90 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/fpm_environment.f90 b/src/fpm_environment.f90 index cde1780..345f6ab 100644 --- a/src/fpm_environment.f90 +++ b/src/fpm_environment.f90 @@ -18,12 +18,13 @@ module fpm_environment integer, parameter, public :: OS_CYGWIN = 4 integer, parameter, public :: OS_SOLARIS = 5 integer, parameter, public :: OS_FREEBSD = 6 + integer, parameter, public :: OS_OPENBSD = 7 contains !> Determine the OS type integer function get_os_type() result(r) !! !! Returns one of OS_UNKNOWN, OS_LINUX, OS_MACOS, OS_WINDOWS, OS_CYGWIN, - !! OS_SOLARIS, OS_FREEBSD. + !! OS_SOLARIS, OS_FREEBSD, OS_OPENBSD. !! !! At first, the environment variable `OS` is checked, which is usually !! found on Windows. Then, `OSTYPE` is read in and compared with common @@ -84,6 +85,12 @@ contains r = OS_FREEBSD return end if + + ! OpenBSD + if (index(val, 'OpenBSD') > 0 .or. index(val, 'openbsd') > 0) then + r = OS_OPENBSD + return + end if end if ! Linux |