Fixes this issue: . Patch from Buildroot: . From fa5ec96a94646492a3f908e12905b3e48a8e800b Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Wed, 18 Apr 2018 20:24:13 +0200 Subject: [PATCH] src/cpp: fix cmake >= 3.11 build CMake < 3.11 doesn't support add_library() without any source file (i.e add_library(foo SHARED)). But flann CMake use a trick that use an empty string "" as source list (i.e add_library(foo SHARED "")). This look like a bug in CMake < 3.11. With CMake >= 3.11, the new behaviour of add_library() break the existing flann CMake code. From CMake Changelog [1]: "add_library() and add_executable() commands can now be called without any sources and will not complain as long as sources are added later via the target_sources() command." Note: flann CMake code doesn't use target_sources() since no source fil
aboutsummaryrefslogtreecommitdiff
STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) - add_library(flann SHARED "") + add_library(flann SHARED "empty.cpp") set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX) target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive) else() diff --git a/src/cpp/empty.cpp b/src/cpp/empty.cpp new file mode 100644 index 0000000..40a8c17 --- /dev/null +++ b/src/cpp/empty.cpp @@ -0,0 +1 @@ +/* empty */ -- 2.14.3
AgeCommit message (Expand)Author