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_model.f90 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/fpm_model.f90') diff --git a/src/fpm_model.f90 b/src/fpm_model.f90 index dd79b94..38625be 100644 --- a/src/fpm_model.f90 +++ b/src/fpm_model.f90 @@ -124,6 +124,12 @@ type :: fpm_model_t !> Command line flags passed to fortran for compilation character(:), allocatable :: fortran_compile_flags + !> Command line flags passed to C for compilation + character(:), allocatable :: c_compile_flags + + !> Command line flags passed to the linker + character(:), allocatable :: link_flags + !> Base directory for build character(:), allocatable :: output_directory @@ -276,6 +282,8 @@ function info_model(model) result(s) s = s // ', archiver=(' // debug(model%archiver) // ')' ! character(:), allocatable :: fortran_compile_flags s = s // ', fortran_compile_flags="' // model%fortran_compile_flags // '"' + s = s // ', c_compile_flags="' // model%c_compile_flags // '"' + s = s // ', link_flags="' // model%link_flags // '"' ! character(:), allocatable :: output_directory s = s // ', output_directory="' // model%output_directory // '"' ! type(string_t), allocatable :: link_libraries(:) -- cgit v1.2.3