From dfeb17a3811054716828be47644ac98b146746de Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Thu, 23 Sep 2021 21:42:56 +0200 Subject: Allow setting, archiver, C compiler flags and linker flags from commandline (#549) - Read Fortran compiler from FPM_FC or --compiler (deprecate FPM_COMPILER) - Read Fortran compiler options from FPM_FFLAGS or --flag - Read C compiler from FPM_CC or --c-compiler (deprecate FPM_C_COMPILER) - Read C compiler options from FPM_CFLAGS or --c-flag - Read archiver from FPM_AR or --archiver - Read linker options from FPM_LDFLAGS or --link-flag --- src/fpm_targets.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fpm_targets.f90') diff --git a/src/fpm_targets.f90 b/src/fpm_targets.f90 index f10b330..23f9447 100644 --- a/src/fpm_targets.f90 +++ b/src/fpm_targets.f90 @@ -483,7 +483,7 @@ subroutine resolve_target_linking(targets, model) if (target%target_type /= FPM_TARGET_C_OBJECT) then target%compile_flags = model%fortran_compile_flags//" "//global_include_flags else - target%compile_flags = global_include_flags + target%compile_flags = model%c_compile_flags//" "//global_include_flags end if allocate(target%link_objects(0)) @@ -498,7 +498,7 @@ subroutine resolve_target_linking(targets, model) call get_link_objects(target%link_objects,target,is_exe=.true.) - target%link_flags = string_cat(target%link_objects," ") + target%link_flags = model%link_flags//" "//string_cat(target%link_objects," ") if (allocated(target%link_libraries)) then if (size(target%link_libraries) > 0) then -- cgit v1.2.3