aboutsummaryrefslogtreecommitdiff
path: root/src/fpm_compiler.f90
diff options
context:
space:
mode:
Diffstat (limited to 'src/fpm_compiler.f90')
-rw-r--r--src/fpm_compiler.f9016
1 files changed, 15 insertions, 1 deletions
diff --git a/src/fpm_compiler.f90 b/src/fpm_compiler.f90
index d94963c..e8e97f4 100644
--- a/src/fpm_compiler.f90
+++ b/src/fpm_compiler.f90
@@ -29,6 +29,7 @@ module fpm_compiler
use fpm_environment, only: &
get_env, &
get_os_type, &
+ os_is_32bit_windows, &
OS_LINUX, &
OS_MACOS, &
OS_WINDOWS, &
@@ -133,7 +134,8 @@ character(*), parameter :: &
flag_gnu_warn = " -Wall -Wextra -Wimplicit-interface", &
flag_gnu_check = " -fcheck=bounds -fcheck=array-temps", &
flag_gnu_limit = " -fmax-errors=1", &
- flag_gnu_external = " -Wimplicit-interface"
+ flag_gnu_external = " -Wimplicit-interface", &
+ flag_gnu_32bit = " -m32"
character(*), parameter :: &
flag_pgi_backslash = " -Mbackslash", &
@@ -194,6 +196,8 @@ function get_default_flags(self, release) result(flags)
end function get_default_flags
subroutine get_release_compile_flags(id, flags)
+ implicit none
+
integer(compiler_enum), intent(in) :: id
character(len=:), allocatable, intent(out) :: flags
@@ -215,6 +219,10 @@ subroutine get_release_compile_flags(id, flags)
flag_gnu_pic//&
flag_gnu_limit//&
flag_gnu_coarray
+
+ if(os_is_32bit_windows()) then
+ flags = flag_gnu_32bit//flags
+ end if
case(id_f95)
flags = &
@@ -286,6 +294,8 @@ subroutine get_release_compile_flags(id, flags)
end subroutine get_release_compile_flags
subroutine get_debug_compile_flags(id, flags)
+ implicit none
+
integer(compiler_enum), intent(in) :: id
character(len=:), allocatable, intent(out) :: flags
@@ -309,6 +319,10 @@ subroutine get_debug_compile_flags(id, flags)
flag_gnu_check//&
flag_gnu_backtrace//&
flag_gnu_coarray
+ if(os_is_32bit_windows()) then
+ flags = flag_gnu_32bit//flags
+ end if
+
case(id_f95)
flags = &
flag_gnu_warn//&