From 806073ccbc8de53fffd762038c3a88f118320ae8 Mon Sep 17 00:00:00 2001 From: Ivan K Date: Sat, 10 Jun 2023 21:20:58 +0300 Subject: [PATCH] utest: test fork safety on OpenMP >= 5 In addition to testing fork safety on non-OpenMP builds, test it when omp_pause_resource_all() is available to release the locks. --- utest/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/utest/Makefile b/utest/Makefile index b82937093f..40dc551ed9 100644 --- a/utest/Makefile +++ b/utest/Makefile @@ -44,10 +44,14 @@ endif #this does not work with OpenMP nor with native Windows or Android threads # FIXME TBD if this works on OSX, SunOS, POWER and zarch ifeq ($(OSNAME), $(filter $(OSNAME),Linux CYGWIN_NT)) -ifneq ($(USE_OPENMP), 1) -OBJS += test_fork.o +ifeq ($(USE_OPENMP), 1) +ifeq ($(HAVE_OMP_PAUSE_RESOURCE_ALL), 1) + OBJS += test_fork.o endif -OBJS += test_post_fork.o +else + OBJS += test_fork.o +endif + OBJS += test_post_fork.o endif ifeq ($(C_COMPILER), PGI)