diff options
author | urbanjost <urbanjost@comcast.net> | 2021-08-04 15:27:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-04 21:27:03 +0200 |
commit | 613da74f29b8ba8ca8de89bf403ab84e1490af30 (patch) | |
tree | c97a6774a64bd31d07013d6247c66a50eec5610e /src/fpm.f90 | |
parent | 8c4fdae2df08d02c5b24e1bb5153132804f79df0 (diff) | |
download | fpm-613da74f29b8ba8ca8de89bf403ab84e1490af30.tar.gz fpm-613da74f29b8ba8ca8de89bf403ab84e1490af30.zip |
Generate build/.gitignore (#528)
- git-specific, but not git-dependent but is it better if managed directly by fpm
- no .gitignore generated by subcommand new
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 |