-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Make the dependency of "outofcore" on "visualization" optional. #6254
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
Make the dependency of "outofcore" on "visualization" optional. #6254
Conversation
Thanks for the pull request. I understand your wish to make the dependency of outofcore on visualization optional. Some thoughts I have on this pull request:
I will look further into this and try to come up with a suggestion. |
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.
Sorry for the delay. I thought about it and while there is likely a way to move some code around and make the queryFrustum
function work even without the visualization module, I think that the outofcore module and the queryFrustum
function in particular are not used enough to justify putting a lot of work in. So I am happy with your approach, just have some minor remarks.
pcl_config.h.in
Outdated
@@ -100,3 +100,5 @@ | |||
|
|||
#cmakedefine HAVE_QVTK 1 | |||
|
|||
#cmakedefine BUILD_visualization |
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 feel like BUILD_visualization
might not send a clear message to a person using PCL. Maybe it would be better to introduce a separate preprocessor symbol, like PCL_VISUALIZATION_AVAILABLE
or similar, and use that in the *.h and *.hpp files (this should then be set to true in visualization/CMakeLists.txt if the visualization module is indeed built).
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.
Yes, a better name would be nice. I tried your suggestion, but couldn't make it work. The problem is that pcl_config.h.in
is generated before the PCL module CMake files are processed (generating it afterwards does not work). So I'm setting in in the main CMakeLists.txt
now.
In outofcore/CMakeLists.txt
, I still use BUILD_visualization
. We could switch that to PCL_VISUALIZATION_AVAILABLE
if you want.
Without "visualization", one of the overloads of queryFrustum is unavailable.
e63be17
to
a8f0e4c
Compare
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.
Thank you! Looks good to me.
I would like to propose the following patch, to make the
outofcore
component not depend on thevisualization
component, because that brings in a pretty large dependency chain via VTK.I noticed that
outofcore
needs only a single method fromvisualization
, which is this overload ofqueryFrustum
.I'm not sure if my approach to make this dependency optional in CMake is correct. But it seems to work fine on my end.
What it does is:
visualization
is enabled, andoutofcore
is enabled, the latter will be built as normalvisualization
is disabled, butoutofcore
is enabled, the latter will be built without the method.