aboutsummaryrefslogtreecommitdiff
path: root/src/fpm.f90
diff options
context:
space:
mode:
authorSebastian Ehlert <28669218+awvwgk@users.noreply.github.com>2021-08-13 15:58:18 +0200
committerGitHub <noreply@github.com>2021-08-13 15:58:18 +0200
commit6f891ed07aef779aa34a6ff42dbaa4080beb19ff (patch)
tree23eb39e171f0a36672d5642978fb54a67f2e3945 /src/fpm.f90
parent6a90ad52837c2287d7d92d4cac6249f504c75135 (diff)
parentd72d95396e75dfcea726f6363d3b8807708fdc4d (diff)
downloadfpm-6f891ed07aef779aa34a6ff42dbaa4080beb19ff.tar.gz
fpm-6f891ed07aef779aa34a6ff42dbaa4080beb19ff.zip
Merge branch 'master' into compiler-object
Diffstat (limited to 'src/fpm.f90')
-rw-r--r--src/fpm.f907
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fpm.f90 b/src/fpm.f90
index 36f63d8..7208abf 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
@@ -55,6 +55,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
+
call new_compiler(model%compiler, settings%compiler)
call new_archiver(model%archiver)