From 8c5763bdabe2374b83c83b8285bdc9c28730ae54 Mon Sep 17 00:00:00 2001 From: LKedward Date: Fri, 9 Apr 2021 14:32:57 +0100 Subject: Allow specifying C compiler with environment variable FPM_C_COMPILER --- src/fpm.f90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fpm.f90 b/src/fpm.f90 index 653f8be..805132c 100644 --- a/src/fpm.f90 +++ b/src/fpm.f90 @@ -4,7 +4,7 @@ use fpm_backend, only: build_package use fpm_command_line, only: fpm_build_settings, fpm_new_settings, & fpm_run_settings, fpm_install_settings, fpm_test_settings use fpm_dependency, only : new_dependency_tree -use fpm_environment, only: run +use fpm_environment, only: run, get_env use fpm_filesystem, only: is_dir, join_path, number_of_rows, list_files, exists, basename use fpm_model, only: fpm_model_t, srcfile_t, show_model, & FPM_SCOPE_UNKNOWN, FPM_SCOPE_LIB, FPM_SCOPE_DEP, & @@ -63,6 +63,7 @@ subroutine build_model(model, settings, package, error) endif call get_default_c_compiler(model%fortran_compiler, model%c_compiler) + model%c_compiler = get_env('FPM_C_COMPILER',model%c_compiler) if (is_unknown_compiler(model%fortran_compiler)) then write(*, '(*(a:,1x))') & -- cgit v1.2.3