aboutsummaryrefslogtreecommitdiff
path: root/src/fpm.f90
diff options
context:
space:
mode:
authorSebastian Ehlert <28669218+awvwgk@users.noreply.github.com>2021-09-20 23:10:15 +0200
committerSebastian Ehlert <28669218+awvwgk@users.noreply.github.com>2021-09-23 21:59:06 +0200
commitbeaf9a86f83c2de0ebc593f5d8bb924cbdb42ed0 (patch)
tree7ae467dbd808d957ac4f3964747d06e661742986 /src/fpm.f90
parentdfeb17a3811054716828be47644ac98b146746de (diff)
downloadfpm-beaf9a86f83c2de0ebc593f5d8bb924cbdb42ed0.tar.gz
fpm-beaf9a86f83c2de0ebc593f5d8bb924cbdb42ed0.zip
Enable multiple build output directories
Diffstat (limited to 'src/fpm.f90')
-rw-r--r--src/fpm.f9013
1 files changed, 5 insertions, 8 deletions
diff --git a/src/fpm.f90 b/src/fpm.f90
index d8381ae..3347e21 100644
--- a/src/fpm.f90
+++ b/src/fpm.f90
@@ -43,7 +43,6 @@ subroutine build_model(model, settings, package, error)
logical :: duplicates_found = .false.
type(string_t) :: include_dir
- character(len=16) :: build_name
model%package_name = package%name
@@ -72,21 +71,19 @@ subroutine build_model(model, settings, package, error)
flags = flags // model%compiler%get_default_flags(settings%profile == "release")
end select
end if
-
cflags = trim(settings%cflag)
ldflags = trim(settings%ldflag)
- write(build_name, '(z16.16)') fnv_1a(flags//cflags//ldflags)
-
if (model%compiler%is_unknown()) then
write(*, '(*(a:,1x))') &
"<WARN>", "Unknown compiler", model%compiler%fc, "requested!", &
"Defaults for this compiler might be incorrect"
end if
- model%output_directory = join_path('build',basename(model%compiler%fc)//'_'//build_name)
+ model%build_prefix = join_path("build", basename(model%compiler%fc))
- model%fortran_compile_flags = flags // " " // &
- & model%compiler%get_module_flag(join_path(model%output_directory, model%package_name))
+ model%fortran_compile_flags = flags
+ model%c_compile_flags = cflags
+ model%link_flags = ldflags
model%include_tests = settings%build_tests
@@ -196,7 +193,7 @@ subroutine build_model(model, settings, package, error)
if (allocated(error)) return
if (settings%verbose) then
- write(*,*)'<INFO> BUILD_NAME: ',build_name
+ write(*,*)'<INFO> BUILD_NAME: ',model%build_prefix
write(*,*)'<INFO> COMPILER: ',model%compiler%fc
write(*,*)'<INFO> C COMPILER: ',model%compiler%cc
write(*,*)'<INFO> COMPILER OPTIONS: ', model%fortran_compile_flags