1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-14 03:10:47 +00:00

math/flann: fix build on GCC architectures

Last addition to files/patch-src_cpp_CMakeLists.txt breaks build.

Also require newer GCC.

PR:		249152
Approved by:	yuri (maintainer)
This commit is contained in:
Piotr Kubaj 2020-09-06 17:59:16 +00:00
parent a2fe46eed4
commit 0d0eb2d192
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=547860
2 changed files with 2 additions and 8 deletions

View File

@ -15,7 +15,7 @@ LIB_DEPENDS= libhdf5.so:science/hdf5 \
liblz4.so:archivers/liblz4 \
libsz.so:science/szip
USES= cmake localbase:ldflags pkgconfig
USES= cmake compiler:c++11-lang localbase:ldflags pkgconfig
USE_GITHUB= yes
GH_ACCOUNT= mariusmuja
USE_LDCONFIG= yes

View File

@ -1,6 +1,6 @@
--- src/cpp/CMakeLists.txt.orig 2019-04-07 03:21:23 UTC
+++ src/cpp/CMakeLists.txt
@@ -25,11 +25,11 @@ if (BUILD_CUDA_LIB)
@@ -25,6 +25,6 @@ if (BUILD_CUDA_LIB)
else()
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};" )
endif()
@ -8,9 +8,3 @@
+ cuda_add_library(flann_cuda_s SHARED ${CU_SOURCES})
set_property(TARGET flann_cuda_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC)
endif()
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+if(CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|DragonFly" AND CMAKE_COMPILER_IS_GNUCC)
add_library(flann_cpp SHARED "")
set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive)