-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
cppm extension support #13257
cppm extension support #13257
Conversation
Unsure if changes in other places needed and testing needed as I'm unfamiliar with meson codebase. In any case, this PR can be the starter of supporting this new file extension as part of full c++20 module support. Related #5024. |
/cc @jpakkane |
https://clang.llvm.org/docs/StandardCPlusPlusModules.html#file-name-requirements Please add |
@rtgiskard I did look at this page. But I decided to only add cppm since this is the most widely accepted extension for C++ modules. Other extensions listed in that page seem to have no other compiler supports (correct if wrong and I will then add accordingly). So, it might happen that later llvm devs decide to drop all of them except Ping @eli-schwartz and @jpakkane due to inactivity for three weeks now. |
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.
Seems like adding lang_suffixes should suffice here.
So if I understand correctly you're just allowing C++ files to be named cppm (whether or not they are modules) for GCC. Does clang actually do something different based on file extension? |
@eli-schwartz this PR is now fixed. |
When backing out changes in a PR, please edit the original commit (using |
recognize the file extension `cppm` as c++ source file
@eli-schwartz Right and now done as per requested. |
I would like to say that I strenuously object to this being merged with the commit message it currently has. |
Since this is now merged into master, no further change can be done for me as an external casual contributor. For future PRs, @eli-schwartz would you like to point out the issues with the current commit message and/or how to improve further? |
It uses some "Angular JS commit style".
This PR originally used the standard commit message syntax, and changed to the Angular JS one in the last push. |
Thanks @eli-schwartz for your detailed and good explanation. They're sensible and I'll stick to the commit message style I initially used for this PR for future PRs to meson then. |
The cppm extension is used to signify a c++ source files meant to be treated as c++ modules. Both msvc and clang support this extension. gcc seems to have no support of any dedicated extension for c++ modules.
Currently, without this patch, meson fails saying no compiler can handle cppm files.