-
Notifications
You must be signed in to change notification settings - Fork 989
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
Feature/b2 rooted dep projects #4211
Feature/b2 rooted dep projects #4211
Conversation
f7a2b3c
to
3aed999
Compare
@grafikrobot, do you have any opinion on whether this should be merged, or I should go some other direction with the fix, or maybe it's the docs that should be changed? |
@grisumbras is there any created issue for the current PR? Could you create it? |
Sorry... I was on vacation. First, this is not a bug fix. When I wrote the generator I intentionally did not make the targets global to allow multiple conan config locations. Which is something useful for large projects that have could have multiple libraries and execs using different versions of packages and still allow them to be isolated. Second, you can get the same effect by having the conan info at the root of your project, AFAIK. If that's not the case, then it would indeed be a bug. But this would not be the fix for the bug as this prevents the use case of localized package usage. |
Yes, it fixes #4200. But I indeed want @grafikrobot to share his opinion, because there might be some implications I don't see, or maybe this was the intended behaviour. |
Looking at what I wrote in the docs:
I would suspect that if that's not working, it's a bug in |
conans/client/generators/b2.py
Outdated
@@ -385,6 +385,7 @@ def b2_toolset_version(self): | |||
conanbuildinfo_project_template = '''\ | |||
# {name} | |||
project-define {name} ; | |||
use-project /{name} : {name} ; |
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 think the better fix is something like this (note, not tested, just eyeballing it):
if [ project.is-jamroot-module [ project-define {name} ] ]
{
use-project /{name} : {name} ;
}
Although putting an equivalent of that in the project-define
rule in the prefix would be better.
3aed999
to
417a150
Compare
Rebased and updated to follow the suggestions. @grafikrobot, can you look at it? |
Thanks @grafikrobot and @grisumbras for your help! |
Changelog: Fix: Allow referring to projects created by b2 generator for dependencies with absolute paths.
Docs: Omit