aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndřej Čertík <ondrej@certik.us>2020-07-22 08:57:40 -0600
committerOndřej Čertík <ondrej@certik.us>2020-07-22 08:57:40 -0600
commit93a9735cb8874d248cd3bfab760f5df05cfc97d5 (patch)
tree77bc064a7ea95af18bdd9f77bc4847ad0855731b
parentf6f67d7e33c9c717ed96e35bb823b732b156d5f7 (diff)
downloadfpm-93a9735cb8874d248cd3bfab760f5df05cfc97d5.tar.gz
fpm-93a9735cb8874d248cd3bfab760f5df05cfc97d5.zip
Rework the macros
-rw-r--r--fpm/src/fpm.F9015
1 files changed, 7 insertions, 8 deletions
diff --git a/fpm/src/fpm.F90 b/fpm/src/fpm.F90
index fa40912..617d5d9 100644
--- a/fpm/src/fpm.F90
+++ b/fpm/src/fpm.F90
@@ -12,22 +12,21 @@ contains
integer function get_os() result(r)
#ifdef _WIN32
r = os_windows
-#elif defined(__APPLE__)
+ return
+#endif
+#ifdef __APPLE__
r = os_macos
-#elif defined(__linux__)
- r = os_linux
-#else
- ! Unsupported platform
- r = -1
- error stop
+ return
#endif
+ ! Assuming Linux here, as gfortran does not specify any macro for Linux
+ r = os_linux
end function
subroutine print_help()
integer :: ostype
ostype = get_os()
print *, "Fortran Package Manager (fpm)"
-print *, ostype
+print *, "OS Type: ", ostype
end subroutine
subroutine run(cmd)