diff options
Diffstat (limited to 'src/fpm.f90')
-rw-r--r-- | src/fpm.f90 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fpm.f90 b/src/fpm.f90 index 89eca1a..68e2bbd 100644 --- a/src/fpm.f90 +++ b/src/fpm.f90 @@ -5,7 +5,7 @@ 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, get_env -use fpm_filesystem, only: is_dir, join_path, number_of_rows, list_files, exists, basename +use fpm_filesystem, only: is_dir, join_path, number_of_rows, list_files, exists, basename, filewrite, mkdir use fpm_model, only: fpm_model_t, srcfile_t, show_model, & FPM_SCOPE_UNKNOWN, FPM_SCOPE_LIB, FPM_SCOPE_DEP, & FPM_SCOPE_APP, FPM_SCOPE_EXAMPLE, FPM_SCOPE_TEST @@ -58,6 +58,11 @@ subroutine build_model(model, settings, package, error) call model%deps%add(package, error) if (allocated(error)) return + ! build/ directory should now exist + if (.not.exists("build/.gitignore")) then + call filewrite(join_path("build", ".gitignore"),["*"]) + end if + if(settings%compiler.eq.'')then model%fortran_compiler = 'gfortran' else |