-
Notifications
You must be signed in to change notification settings - Fork 184
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
Add option to allow CPMFindPackage
to behave as find_package
#432
Comments
Not sure I understand but does CPM_USE_LOCAL_PACKAGES not work for this? |
EDIT: Apologies, I forgot a critical detail of my use case, where there's a combination of |
@kkraus14 Is you problem solved with setting CPM_USE_LOCAL_PACKAGES to NO? |
Unfortunately not. We have a scenario that looks roughly like the following:
Currently, The workaround here looks something like wrapping |
We currently use
CPMFindPackage
as a way to try to find a package if it currently exists on the users system, but then fall back to fetching it and building it from source if it doesn't currently exist. This works great for users in practice because generally it makes the builds just work which is the goal.Unfortunately, one of the downsides to this is that for us as library maintainers and packagers, we can run into issues where in a packaging flow we expect to have all of the packages installed on the system, but if we miss something then it falls back to
CPMAddPackage
and can lead to us erroneously bundling that dependency in our package.It would be great if there were options that had the opposite behavior of
CPM_DOWNLOAD_ALL
andCPM_DOWNLOAD_<dependency name>
that would prevent fetching the package from source if it was failed to be found.The text was updated successfully, but these errors were encountered: