aboutsummaryrefslogtreecommitdiff
path: root/src/fpm.f90
diff options
context:
space:
mode:
authorSebastian Ehlert <28669218+awvwgk@users.noreply.github.com>2021-10-10 18:03:37 +0200
committerGitHub <noreply@github.com>2021-10-10 18:03:37 +0200
commitdf9b01a652a37b968e29d32c24f3c690f130e890 (patch)
tree51cecbcf3e2b6b5435e1006e988555415f0ef85e /src/fpm.f90
parentd129243af8dbff5ff5771bea8162699743c2aca7 (diff)
parent6f816ad20ffe8897feec9a8a91ab8c7bf1d2d753 (diff)
downloadfpm-df9b01a652a37b968e29d32c24f3c690f130e890.tar.gz
fpm-df9b01a652a37b968e29d32c24f3c690f130e890.zip
Merge pull request #575 from awvwgk/build-dirs
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