Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Mar 2023 00:05:45 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 46742e35f18b - main - science/gdma: fix build without libomp
Message-ID:  <202303130005.32D05jn9080448@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

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

commit 46742e35f18ba774fa326835d28d7a75ca4c447a
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-03-13 00:02:48 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-03-13 00:02:48 +0000

    science/gdma: fix build without libomp
    
    CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
    CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
    CMake Error at /usr/local/share/cmake/Modules/FindOpenMP.cmake:261 (try_compile):
      Failed to configure test project build system.
    Call Stack (most recent call first):
      /usr/local/share/cmake/Modules/FindOpenMP.cmake:537 (_OPENMP_GET_FLAGS)
      cmake/autocmake_omp.cmake:30 (find_package)
      CMakeLists.txt:28 (include)
---
 science/gdma/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/science/gdma/Makefile b/science/gdma/Makefile
index f6c77be58a91..2af8978ca9cd 100644
--- a/science/gdma/Makefile
+++ b/science/gdma/Makefile
@@ -17,7 +17,11 @@ GH_ACCOUNT=	psi4
 USE_LDCONFIG=	yes
 
 CMAKE_ARGS=	-DBUILD_SHARED_LIBS:BOOL=ON \
-		-DENABLE_XHOST:BOOL=OFF \
-		-DENABLE_OPENMP:BOOL=ON
+		-DENABLE_XHOST:BOOL=OFF
+.if !exists(/usr/include/omp.h)
+CMAKE_ARGS+=	-DENABLE_OPENMP:BOOL=OFF
+.else
+CMAKE_ARGS+=	-DENABLE_OPENMP:BOOL=ON
+.endif
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303130005.32D05jn9080448>