flann-lib / flann

Fast Library for Approximate Nearest Neighbors
http://people.cs.ubc.ca/~mariusm/flann
Other
2.22k stars 649 forks source link

How to compile with cmake 3.14 #411

Closed td43 closed 5 years ago

td43 commented 5 years ago

(1)create a file named "empty.cpp" under flann/src/cpp/ (2)change several lines in CMakeLists.txt under flann/src/cpp/CMakeList:

line 33: add_library(flann_cpp SHARED "empty.cpp")
line 46: add_library(flann_cpp SHARED empty.cpp ${CPP_SOURCES})
line 94: add_library(flann SHARED "empty.cpp")
line 99: add_library(flann SHARED empty.cpp ${C_SOURCES})

(3) in the main CMakeList at /flann/CMakeList.txt add the next line:

set (CMAKE_CXX_STANDARD 11)

And done,

cmake ../
make