-
-
Notifications
You must be signed in to change notification settings - Fork 617
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
Detect native source files. #685
Conversation
My gmake fixes depend on this... |
fb8490a
to
8bcad5d
Compare
end | ||
|
||
function path.iscppfile(fname) | ||
return path.hasextension(fname, { ".cc", ".cpp", ".cxx", ".c", ".s", ".m", ".mm" }) | ||
return path.hasextension(fname, { ".cc", ".cpp", ".cxx" }) |
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.
While you're changing this, can you throw .c++
in as per #612?
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 gueeeeess... although that's a really weird file extension :/
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 don't disagree, it's completely valid (I tested it on Windows lol) and it seems to be used by things. I think @starkos has a better idea though.
A good idea. A couple of thoughts, if you don't mind considering them while you're in the code:
|
-- better suggestions. | ||
-- | ||
|
||
function path.isnativefile(fname) |
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 with @starkos on this one... this should move to toolset, and rename to "isbuildablefile".
I'm going to merge this, it's better then what we currently have, even though I still think some of this behavior should move to toolset. |
Separated the concept of 'native' languages from language detection.
There is code that assumes native code == c/c++ code.
I also feel it's weird to conflate asm and obj-c... I can imagine myself writing code to detect those languages with the intent to do something language-specific that's probably not applicable to asm or whatever.