Skip to content
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

C++20 scan sources for module #145

Open
Cheaterdev opened this issue Oct 7, 2021 · 8 comments
Open

C++20 scan sources for module #145

Cheaterdev opened this issue Oct 7, 2021 · 8 comments

Comments

@Cheaterdev
Copy link

Hello!
For proper generating header units from regular header files, there is a switch in MSVC "ScanSourceForModuleDependencies" in the "ClCompile" block which is currently missing from Sharpmake.

@belkiss
Copy link
Contributor

belkiss commented Oct 11, 2021

Heya! Sharpmake doesn't (yet) support c++20 modules. I'll leave this open till we look into it :)
Thanks!

@ChemistAion
Copy link

Any plans or progress on the c++20 modules matter?
Especially the "ForceCreateReferences" switch #146 would be great.

@xoorath
Copy link

xoorath commented Nov 11, 2022

Hey @belkiss - using a direct ping to ask the same question. Any progress made on module support? If not yet, is it on a roadmap anywhere or just sitting in todo status?

Thanks for any insights.

@Cheaterdev
Copy link
Author

Hey @belkiss - using a direct ping to ask the same question. Any progress made on module support? If not yet, is it on a roadmap anywhere or just sitting in todo status?

Thanks for any insights.

I'm able to use modules right now with dependencies from other projects with this simple change:
dev...Cheaterdev:Sharpmake:dev#diff-3b4daac922926a117976678caf15dc7f785154add1e9fd2f3eab0eddf6f129d7

@ChemistAion
Copy link

I could only confirm what @Cheaterdev did, I am using his patch as-is to make Sharpmake work with c++20 modules in my project with no issues.

@xoorath
Copy link

xoorath commented Nov 12, 2022

Thanks both. For anyone else who stumbles over here you will also want to add the .ixx extension to the project.

(in project constructor):

SourceFilesExtensions.Add(".ixx");
SourceFilesCompileExtensions.Add(".ixx");

Other helpful settings for visual studio:

// "All Modules Are Public" from the VC++ Directories project page
CustomProperties.Add("AllProjectBMIsArePublic", "false");

// PublicModuleDirectories: "Public C++ Module Directories" from the VC++ Directories project page
CustomProperties.Add("PublicModuleDirectories", @"$(ProjectDir)..\Public");

@belkiss
Copy link
Contributor

belkiss commented Nov 14, 2022

Heya!

Hey @belkiss - using a direct ping to ask the same question. Any progress made on module support? If not yet, is it on a roadmap anywhere or just sitting in todo status?

Thanks for any insights.

Nothing on the roadmap, modules are not something we have investigated yet internally. Note that my time at Ubisoft is coming to an end very shortly, so can't say if that's gonna change.

Thanks to the other contributors for the workarounds!

Cheers

ChemistAion added a commit to ChemistAion/sharpmake that referenced this issue Mar 10, 2023
@ChemistAion
Copy link

@Cheaterdev I have made a PR in your behalf - I am tired to "manually" add it every time I update the tool ;)
#253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
@xoorath @belkiss @Cheaterdev @ChemistAion and others