package/flann: needs C++11 support

Fixes:

  - http://autobuild.buildroot.net/results/c92a3df1bc73e00e1e4493500bfb7277cf5064ee

  .../build/flann-1.9.2/src/cpp/flann/util/lsh_table.h:367:5: error: 'random_device' is not a member of 'std'
     std::random_device rd;
     ^

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 16cd9494ba)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Peter Seiderer 2023-03-26 09:48:20 +02:00 committed by Peter Korsgaard
parent 5380a3f3ae
commit e660b4fe42
2 changed files with 5 additions and 3 deletions

View File

@ -2,6 +2,7 @@ config BR2_PACKAGE_FLANN
bool "flann" bool "flann"
depends on BR2_INSTALL_LIBSTDCPP depends on BR2_INSTALL_LIBSTDCPP
depends on !BR2_STATIC_LIBS depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11
select BR2_PACKAGE_LZ4 select BR2_PACKAGE_LZ4
help help
FLANN is a library for performing fast approximate nearest FLANN is a library for performing fast approximate nearest
@ -22,5 +23,6 @@ config BR2_PACKAGE_FLANN_EXAMPLES
endif endif
comment "flann needs a toolchain w/ C++, dynamic library" comment "flann needs a toolchain w/ C++, dynamic library, gcc >= 4.7"
depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_7

View File

@ -18,7 +18,7 @@ FLANN_CONF_OPTS = \
-DUSE_OPENMP=$(if $(BR2_TOOLCHAIN_HAS_OPENMP),ON,OFF) \ -DUSE_OPENMP=$(if $(BR2_TOOLCHAIN_HAS_OPENMP),ON,OFF) \
-DCMAKE_DISABLE_FIND_PACKAGE_HDF5=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=TRUE
FLANN_CXXFLAGS = $(TARGET_CXXFLAGS) FLANN_CXXFLAGS = $(TARGET_CXXFLAGS) -std=c++11
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y) ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
FLANN_CXXFLAGS += -O0 FLANN_CXXFLAGS += -O0