Sharpmake
Sharpmake copied to clipboard
C++20 scan sources for module
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.
Heya! Sharpmake doesn't (yet) support c++20 modules. I'll leave this open till we look into it :) Thanks!
Any plans or progress on the c++20 modules matter? Especially the "ForceCreateReferences" switch #146 would be great.
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.
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: https://github.com/ubisoft/Sharpmake/compare/dev...Cheaterdev:Sharpmake:dev#diff-3b4daac922926a117976678caf15dc7f785154add1e9fd2f3eab0eddf6f129d7
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.
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");
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
@belkiss: before you go... making a public branch with just this two-liner (literally) would lead to c++20 modules (virtually) free-testing by community - in the mean time... since you are not investigated this topic internally yet
@Cheaterdev I have made a PR in your behalf - I am tired to "manually" add it every time I update the tool ;) https://github.com/ubisoft/Sharpmake/pull/253