cxxmodules: make export trampoline script files unique

Include the name of the `EXPORT` in the filename when generating export
information for C++ modules. This allows the same directory to be used
for multiple sets of C++ module-using targets.

For `export(TARGETS)` uses, generate a name based on the hash of the
concatenation of the target names involved with the `export()` call.

Fixes: #25609
This commit is contained in:
Ben Boeckel
2024-01-18 13:19:17 -05:00
committed by Brad King
parent 2352dcc830
commit d791f3a180
13 changed files with 128 additions and 38 deletions

View File

@@ -56,7 +56,10 @@ protected:
cmTargetExport* te) override;
std::string GetCxxModulesDirectory() const override { return {}; }
void GenerateCxxModuleConfigInformation(std::ostream&) const override {}
void GenerateCxxModuleConfigInformation(std::string const&,
std::ostream&) const override
{
}
private:
std::string FindTargets(const std::string& prop,