From 8d14ec26dde8ca012fb34a2b065d651d90ac5fc5 Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Mon, 13 Mar 2023 00:02:55 +0000 Subject: [PATCH] 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, std::__1::allocator >*' [-fpermissive] --- cad/openvsp/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cad/openvsp/Makefile b/cad/openvsp/Makefile index f15a9a5224075..2526571f8921f 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