Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Mar 2023 00:05:50 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: 8d14ec26dde8 - main - cad/openvsp: fix build without libomp
Message-ID:  <202303130005.32D05ojV080536@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=8d14ec26dde8ca012fb34a2b065d651d90ac5fc5

commit 8d14ec26dde8ca012fb34a2b065d651d90ac5fc5
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-03-13 00:02:55 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-03-13 00:02:55 +0000

    cad/openvsp: 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)
      src/vsp_aero/Solver/CMakeLists.txt:9 (FIND_PACKAGE)
    
    -fpermissive necessary because of:
    /usr/include/c++/v1/__memory/compressed_pair.h:48:9: error: invalid conversion from 'int' to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*' [-fpermissive]
---
 cad/openvsp/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/cad/openvsp/Makefile b/cad/openvsp/Makefile
index f15a9a522407..2526571f8921 100644
--- a/cad/openvsp/Makefile
+++ b/cad/openvsp/Makefile
@@ -24,8 +24,14 @@ LIB_DEPENDS=	libdrm.so:graphics/libdrm \
 		libfltk.so:x11-toolkits/fltk \
 		libcpptest.so:devel/cpptest
 
-USES=		compiler:c++11-lang cmake:noninja localbase\
+USES=		cmake:noninja localbase\
 		gl gnome jpeg xorg
+.if !exists(/usr/include/omp.h)
+CXXFLAGS+=	-fpermissive
+USES+=		compiler:gcc-c++11-lib
+.else
+USES+=		compiler:c++11-lang 
+.endif
 USE_GITHUB=	yes
 GH_ACCOUNT=	${GH_PROJECT}
 GH_PROJECT=	OpenVSP



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