-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
msvc: fix -I"" for same directory pch header #231
Conversation
Blah, this will blow up if it will expand to an absolute path, any ideas of a simple fix? Workarounding the lack of |
I would say that the bug is in B2 :D expanding, filed #232. |
The only semi non-hack solution I can think of is doing the dir/file split in the rule instead of the action. That way the dir will end up as an empty list instead of the empty string in the list:
And the action uses |
That what I called a workaround :-) I would prefer |
That won't work for two reasons:
|
d18e8f6
to
ad24683
Compare
I realized it is might be wrong to create PCH with only header name, it is preferable to use the exact path the user typed, but it seems to hard to obtain it? Also made some refactoring as a drive by. |
@@ -689,15 +689,15 @@ rule compile.c ( targets + : sources * : properties * ) | |||
{ | |||
set-setup-command $(targets) : $(properties) ; | |||
get-rspline $(targets) : -TC CFLAGS ; | |||
compile-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return $(PCH_HEADER) ] ; | |||
compile-c-c++ $(<) : $(>) ; |
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'm actually not sure why it was done like this, maybe I miss something, like it's need to run header scanning or something else?
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.
Maybe header scanning. But not sure on that. It does seem rather weird.
5801366
to
0b933da
Compare
Pass to `-Yc` path as was typed by user (not exactly so, B2 automatically turns / to \ on Windows, so force the / in variable expansion).
0b933da
to
65fa7a5
Compare
/backport |
Successfully created backport PR for |
It would be nice to fix that by doing
:D:E=.
but unfortunately it does not work.Fixes #229