git: 4e0db8a74064 - main - astro/geographiclib: fix build without libomp
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 13 Mar 2023 00:05:35 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4e0db8a7406485b81659c9b26b0629756faecc15
commit 4e0db8a7406485b81659c9b26b0629756faecc15
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-03-13 00:02:24 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-03-13 00:02:24 +0000
astro/geographiclib: fix build without libomp
CMake Error at /usr/local/share/cmake/Modules/FindOpenMP.cmake:261 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
/usr/local/share/cmake/Modules/FindOpenMP.cmake:537 (_OPENMP_GET_FLAGS)
examples/CMakeLists.txt:35 (find_package)
---
astro/geographiclib/Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/astro/geographiclib/Makefile b/astro/geographiclib/Makefile
index 30bba17d135a..7a58ee99f264 100644
--- a/astro/geographiclib/Makefile
+++ b/astro/geographiclib/Makefile
@@ -15,7 +15,12 @@ WWW= https://geographiclib.sourceforge.io/
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
-USES= cmake compiler:c++14-lang localbase python:env
+USES= cmake localbase python:env
+.if !exists(/usr/include/omp.h)
+USES+= compiler:gcc-c++11-lib
+.else
+USES+= compiler:c++14-lang
+.endif
USE_LDCONFIG= yes
USE_PYTHON= optsuffix
CMAKE_ARGS= -DGEOGRAPHICLIB_DATA:STRING=${DATADIR:Q} \