-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Remove global includes and use target include for Apps #6009
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
Conversation
784a150
to
56499d3
Compare
Could you rebase this on master, please? |
56499d3
to
7d8a618
Compare
apps/CMakeLists.txt
Outdated
PCL_ADD_EXECUTABLE(pcl_test_search_speed COMPONENT ${SUBSYS_NAME} SOURCES src/test_search.cpp) | ||
target_link_libraries(pcl_test_search_speed pcl_common pcl_io pcl_search pcl_kdtree pcl_visualization) | ||
|
||
PCL_ADD_EXECUTABLE(pcl_nn_classification_example COMPONENT ${SUBSYS_NAME} SOURCES src/nn_classification_example.cpp) | ||
target_link_libraries(pcl_nn_classification_example pcl_common pcl_io pcl_features pcl_kdtree) | ||
target_link_libraries(pcl_nn_classification_example pcl_apps pcl_common pcl_io pcl_features pcl_kdtree) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this has to link to pcl_apps
when it didn't have to before? (same for some more executables below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it includes pcl/apps/vfh_nn_classifier.h - which resides in apps "library".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 21 the old include_directories made this available to all the executables afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But vfh_nn_classifier.h
seems to be a standalone header with every function fully defined, so no corresponding cpp file that would make linking to pcl_apps necessary. Wouldn't it be better to add target_include_directories(pcl_nn_classification_example ...)
instead of unnecessarily adding pcl_apps
as a dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that should do it aswell of course. I'll change asap.
follows after #6008