Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not prepend -D in FLANN_DEFINITIONS in FindFLANN.cmake #2905

Merged

Conversation

dooxe
Copy link
Contributor

@dooxe dooxe commented Mar 11, 2019

Corrected FLANN definitions that made an error when compiling pcl statically.

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:

set(FLANN_DEFINITIONS ${FLANN_DEFINITIONS} "-DFLANN_STATIC")

The build is going well by removing -D

Maintainer Edit: closes #2904

Corrected FLANN definitions that made an error when compiling pcl statically
@SergioRAgostinho SergioRAgostinho changed the title Issue 2904: Error with FLANN definitions in FindFLANN.cmake Do not prepend -D in FLANN_DFINITIONS in FindFLANN.cmake Mar 12, 2019
@SergioRAgostinho SergioRAgostinho merged commit cd9cfa7 into PointCloudLibrary:master Mar 12, 2019
@SergioRAgostinho
Copy link
Member

Thank you @dooxe. 👍

@taketwo taketwo changed the title Do not prepend -D in FLANN_DFINITIONS in FindFLANN.cmake Do not prepend -D in FLANN_DEFINITIONS in FindFLANN.cmake Mar 12, 2019
@dooxe
Copy link
Contributor Author

dooxe commented Mar 12, 2019

You're welcome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error with FLANN definitions in FindFLANN.cmake
3 participants