Hello,
When statically building a fresh-cloned PCL git repo, I get the following error:
[ 5%] Building CXX object kdtree/CMakeFiles/pcl_kdtree.dir/src/kdtree_flann.cpp.o
In file included from <built-in>:417:
<command line>:1:9: error: macro name must be an identifier
#define -DFLANN_STATIC 1
It seems to be related to the FLANN definitions in cmake/FindFLANN.cmake file:
https://github.com/PointCloudLibrary/pcl/blob/dd905161a242087a21ef367a6070ee86556ba2ac/cmake/Modules/FindFLANN.cmake#L53
The build is going well by removing -D
Thanks for reporting. Would you mind submitting a pull request with the fix?
No problem, I'll do it as soon as the build is over so that I'm sure the change has no side effect.
Ok,posted the pull request: https://github.com/PointCloudLibrary/pcl/pull/2905, I hope it will help.