diff options
author | LKedward <laurence.kedward@bristol.ac.uk> | 2021-04-09 14:32:57 +0100 |
---|---|---|
committer | Laurence Kedward <laurence.kedward@bristol.ac.uk> | 2021-04-09 14:45:29 +0100 |
commit | 8c5763bdabe2374b83c83b8285bdc9c28730ae54 (patch) | |
tree | f7c7a784dc2d6c1ab22e654f6e85aba1311ece73 /src/fpm.f90 | |
parent | 836a652f85b505493673ef2b3adc4703060ef10b (diff) | |
download | fpm-8c5763bdabe2374b83c83b8285bdc9c28730ae54.tar.gz fpm-8c5763bdabe2374b83c83b8285bdc9c28730ae54.zip |
Allow specifying C compiler with environment variable
FPM_C_COMPILER
Diffstat (limited to 'src/fpm.f90')
-rw-r--r-- | src/fpm.f90 | 3 |
1 files changed, 2 insertions, 1 deletions
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))') & |