-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Prevent search for disabled optional dependencies in targets. #2229
Prevent search for disabled optional dependencies in targets. #2229
Conversation
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.
LGTM
cmake/pcl_pclconfig.cmake
Outdated
string(REGEX REPLACE "-(.*)" "" _condition ${_tmp}) #libusb-1.0 case | ||
if(${${_condition}}) | ||
set(PCLCONFIG_OPTIONAL_DEPENDENCIES "${PCLCONFIG_OPTIONAL_DEPENDENCIES}${_opt_dep} ") | ||
endif(${${_condition}}) |
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.
It is not necessary to repeat condition expression in the endif
since CMake 2.8.
cmake/pcl_pclconfig.cmake
Outdated
set(PCLCONFIG_OPTIONAL_DEPENDENCIES "${PCLCONFIG_OPTIONAL_DEPENDENCIES}${_opt_dep} ") | ||
string(TOUPPER "WITH_${_opt_dep}" _tmp) | ||
string(REGEX REPLACE "-(.*)" "" _condition ${_tmp}) #libusb-1.0 case | ||
if(${${_condition}}) |
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.
It is enough to supply variable name to if
. Thus in this case
if(${_condition})
f42e50f
to
0c84328
Compare
I assume you tried to build/install/find_package after this change? |
Yep. I hit the bug on a fresh machine installation. I didn't have Qhull installed and cmake was throwing some problematic warnings/errors regarding Qhull not being found. |
Great. Small patch, but extremely useful 💯 |
This covers the first issue mentioned in #1547.