-
Notifications
You must be signed in to change notification settings - Fork 248
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
Have an option to propagate CMAKE_PREFIX_PATH
#887
Comments
I think this could be done in a similar way we handle |
My thoughts on how to implement this were to add a new provider for providing a |
This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_foreign_cc! |
This issue was automatically closed because it went 30 days without a reply since it was labeled "Can Close?" |
+1 Just trying to picture how the provider would work. We could start with cmake rules. The end result I assume is The paths could be read and passed to _merge_prefix_paths where they'd be merged with user-defined paths. The dep cmake rule could output the new provider (or perhaps update @jsharpe perhaps we could re-open this issue. |
I see that in the
libgit2
example, we pass alongCMAKE_PREFIX_PATH
manually. This is nice for one or two packages, but can be an annoyance when there is a large tree of dependencies.It would be awesome if the
cmake()
rule could preserve its output (thecopy_:rule_name/:rule_name
directory) in the provider it returns, and then (optionally) pass them on to the dependentcmake()
builds.Adding the info to the provider seems simple enough, but we might want to control how or which dependencies are added to the cache entries. We could introduce an optional
prefix_path
command, with the following logic:None
(the default), then copy from all transitivecmake
dependencies.cmake()
rules, or at least rules that provide the same provider that holds the prefix path info.Then aggregate all the prefix path variables,
;
-join them and optionally append to an existingCMAKE_PREFIX_PATH
from thecache_entries
, or else generate a new entry.This should make it so that by default CMake dependencies can find each other by default.
The text was updated successfully, but these errors were encountered: