git: ea638cbdd5f2 - main - math/spfft: disable OPENMP when building without libomp to fix build

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Sun, 04 Aug 2024 12:01:25 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ea638cbdd5f2df31120df63b59b4bf91865e59cd

commit ea638cbdd5f2df31120df63b59b4bf91865e59cd
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2024-07-31 21:20:54 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2024-08-04 12:00:44 +0000

    math/spfft: disable OPENMP when building without libomp to fix build
---
 math/spfft/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/math/spfft/Makefile b/math/spfft/Makefile
index 7bad4ac283f6..53c508210a18 100644
--- a/math/spfft/Makefile
+++ b/math/spfft/Makefile
@@ -34,7 +34,7 @@ CMAKE_TESTING_TARGET=	${ALL_TARGET}
 OPTIONS_DEFINE=		FORTRAN OPENMP
 OPTIONS_SINGLE=		MPI
 OPTIONS_SINGLE_MPI=	NOMPI MPICH OPENMPI
-OPTIONS_DEFAULT=	FORTRAN MPICH OPENMP
+OPTIONS_DEFAULT=	FORTRAN MPICH
 OPTIONS_SUB=		yes
 
 FORTRAN_USES=		fortran
@@ -51,6 +51,10 @@ OPENMPI_CMAKE_ON=	-DSPFFT_MPI=ON
 
 OPENMP_CMAKE_BOOL=	SPFFT_OMP
 
+.if exists(/usr/include/omp.h)
+OPTIONS_DEFAULT+=	OPENMP
+.endif
+
 post-test:
 	@cd ${BUILD_WRKSRC}/tests && \
 		./run_local_tests && \