From 9dc068d256da43085582956626881461ffdcd356 Mon Sep 17 00:00:00 2001 From: Laurence Kedward Date: Sat, 20 Nov 2021 18:01:09 +0000 Subject: Add: critical section to mkdir in backend (#613) Allows parallel builds on Windows where mkdir complains if directory already exists. --- src/fpm_backend.f90 | 2 ++ 1 file changed, 2 insertions(+) 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) -- cgit v1.2.3