aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurence Kedward <laurence.kedward@bristol.ac.uk>2021-11-20 18:01:09 +0000
committerGitHub <noreply@github.com>2021-11-20 19:01:09 +0100
commit9dc068d256da43085582956626881461ffdcd356 (patch)
tree1af99a21f129f601d129e4dbac4a4e4716a3eed3
parentc39aa47da857957b0a110a6939a5071bbc903571 (diff)
downloadfpm-9dc068d256da43085582956626881461ffdcd356.tar.gz
fpm-9dc068d256da43085582956626881461ffdcd356.zip
Add: critical section to mkdir in backend (#613)
Allows parallel builds on Windows where mkdir complains if directory already exists.
-rw-r--r--src/fpm_backend.f902
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fpm_backend.f90 b/src/fpm_backend.f90
index 6cf4f2d..e0c6d73 100644
--- a/src/fpm_backend.f90
+++ b/src/fpm_backend.f90
@@ -268,9 +268,11 @@ subroutine build_target(model,target,stat)
integer :: fh
+ !$omp critical
if (.not.exists(dirname(target%output_file))) then
call mkdir(dirname(target%output_file))
end if
+ !$omp end critical
select case(target%target_type)