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

FindOrBuildPackage: Do not run find_package if YCM_DISABLE_SYSTEM_PACKAGES is ON #404

Merged
merged 3 commits into from
Apr 14, 2022

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Apr 13, 2022

In FindOrBuildPackage a preliminary find_package is run to decide if it make sense to provide to the
user the USE_SYSTEM_${_PKG} option. However if YCM_DISABLE_SYSTEM_PACKAGES is ON, the
USE_SYSTEM_${_PKG} option is already disabled, so we can skip the find_package calls.

This change should dramatically reduce the CMake configuration for superbuilds in which YCM_DISABLE_SYSTEM_PACKAGES is ON and that have many subpackages.

…KAGES is ON

In FindOrBuildPackage a preliminary `find_package` is run to decide if it make sense to provide to the 
user the `USE_SYSTEM_${_PKG}` option. However if `YCM_DISABLE_SYSTEM_PACKAGES`  is ON, the
`USE_SYSTEM_${_PKG}` option is already disabled, so we can skip the `find_package` calls.
@traversaro
Copy link
Member Author

traversaro commented Apr 13, 2022

I tested locally in a WSL2 instance, and this PR reduce the CMake configuration from 42 seconds (top) to 12 seconds (bottom):
local_build

@traversaro
Copy link
Member Author

The test in robotology/robotology-superbuild#1093 were successful.

@traversaro traversaro merged commit 7396577 into master Apr 14, 2022
@traversaro traversaro deleted the speedupwindowsbootstrap branch April 14, 2022 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants