flann-lib / flann

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

Fix solve cmake error with cmake >= 3.11 using a dummy file #457

Open pemmanuelviel opened 4 years ago

pemmanuelviel commented 4 years ago

CMake doesn't support anymore add_library with a "" sources field, that was previously allowing further to link exclusively with a static lib. This solution creates a dummy empty source file passed to add_library.

mikepurvis commented 2 years ago

Similar fix being used with the Debian packaging of flann:

https://salsa.debian.org/science-team/flann/-/blob/debian/1.9.1+dfsg-9/debian/patches/0001-src-cpp-fix-cmake-3.11-build.patch