Sharpmake icon indicating copy to clipboard operation
Sharpmake copied to clipboard

Patch for c++20 modules raw support

Open ChemistAion opened this issue 2 years ago • 6 comments

This is work of @cheaterdev, details are in: https://github.com/ubisoft/Sharpmake/issues/145 https://github.com/ubisoft/Sharpmake/issues/146

ChemistAion avatar Mar 10 '23 19:03 ChemistAion

This one-liner (by @Cheaterdev) allows to work with c++20 modules flawlessly, could you please do some regression tests on this? ...since @belkiss (involved in these discussions) stopped responding :|

ChemistAion avatar Mar 10 '23 20:03 ChemistAion

belkiss is no longer working at ubisoft, sadly. I will take a look at this in the next few days.

jspelletier avatar Mar 21 '23 14:03 jspelletier

@jspelletier: ack, I appreciate it... waiting for yours analysis

ChemistAion avatar Mar 21 '23 18:03 ChemistAion

this modifies a bunch of vcxproj and adds a lots of unwanted project reference to our vcxproj.

Why don't you instead set ExportAdditionalLibrariesEvenForStaticLib to true in your configurations? Would be equivalent to the if condition that you removed(I think). Or if this is not possible and doesn't work, would need to hide this new behavior behind some feature flag(possibly a new bool in Project.Configuration)

jspelletier avatar Mar 21 '23 19:03 jspelletier

I will conduct some tests based on your recommendation, give me a few hours.

ChemistAion avatar Mar 22 '23 09:03 ChemistAion

this modifies a bunch of vcxproj and adds a lots of unwanted project reference to our vcxproj.

Why don't you instead set ExportAdditionalLibrariesEvenForStaticLib to true in your configurations? Would be equivalent to the if condition that you removed(I think). Or if this is not possible and doesn't work, would need to hide this new behavior behind some feature flag(possibly a new bool in Project.Configuration)

Because when having multiple projects with modules it starts exporting lib files as well and linker is going crazy - a lot of duplicates. We just need proper references between projects, nothing more.

Cheaterdev avatar Mar 22 '23 11:03 Cheaterdev