aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpm/src/fpm.f9017
1 files changed, 17 insertions, 0 deletions
diff --git a/fpm/src/fpm.f90 b/fpm/src/fpm.f90
index 85597c0..d9d1bac 100644
--- a/fpm/src/fpm.f90
+++ b/fpm/src/fpm.f90
@@ -3,8 +3,25 @@ implicit none
private
public :: print_help, cmd_build
+integer, parameter :: os_linux = 1
+integer, parameter :: os_macos = 2
+integer, parameter :: os_windows = 3
+
contains
+integer function get_os() result(r)
+#ifdef _WIN32
+ r = os_windows
+#elif defined __APPLE__
+ r = os_macos
+#elif defined __linux__
+ r = os_linux
+#else
+ ! Unsupported platform
+ error stop
+#endif
+end function
+
subroutine print_help()
print *, "Fortran Package Manager (fpm)"
end subroutine