git: 230ffdc7852d - main - lang/opensycl: fix build without libomp
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 04 Aug 2024 12:01:21 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=230ffdc7852d064f72199e72afc846c7fb8fe40f
commit 230ffdc7852d064f72199e72afc846c7fb8fe40f
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2024-07-31 10:55:35 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2024-08-04 12:00:40 +0000
lang/opensycl: fix build without libomp
CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first):
/usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake/Modules/FindOpenMP.cmake:581 (find_package_handle_standard_args)
src/runtime/CMakeLists.txt:181 (find_package)
---
lang/opensycl/Makefile | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lang/opensycl/Makefile b/lang/opensycl/Makefile
index 6af45cda9410..0d553d18ec2e 100644
--- a/lang/opensycl/Makefile
+++ b/lang/opensycl/Makefile
@@ -15,7 +15,7 @@ BROKEN_FreeBSD_13_armv7= configure fails: Cannot run simple program using std::f
BUILD_DEPENDS= boost-libs>0:devel/boost-libs
-USES= cmake compiler:c++11-lang llvm:15 python shebangfix
+USES= cmake llvm:15 python shebangfix
USE_LDCONFIG= yes
USE_GITHUB= yes
@@ -24,6 +24,12 @@ GH_PROJECT= OpenSYCL
SHEBANG_FILES= bin/syclcc-clang cmake/syclcc-launcher
+.if !exists(/usr/include/omp.h)
+USES+= compiler:gcc-c++11-lib
+.else
+USES+= compiler:c++11-lang
+.endif
+
do-test: # many tests fail, see https://github.com/OpenSYCL/OpenSYCL/issues/996
@cd ${WRKSRC}/tests && \
mkdir -p build && \