summaryrefslogtreecommitdiffstats
path: root/Source/cmExportFileGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-01-18 22:44:41 (GMT)
committerBrad King <brad.king@kitware.com>2024-01-18 22:45:07 (GMT)
commit4cd153afe324afb228c9123ace15c5bffcd4fbdf (patch)
treef044cc459e65f8b59a1b35012dfe4e1ad298a204 /Source/cmExportFileGenerator.cxx
parentc75047709f2ee2a3f8791f19b9ce8cc76e633521 (diff)
parentd791f3a180c7231bc2b45c9204c0a912c06b91ee (diff)
downloadCMake-4cd153afe324afb228c9123ace15c5bffcd4fbdf.zip
CMake-4cd153afe324afb228c9123ace15c5bffcd4fbdf.tar.gz
CMake-4cd153afe324afb228c9123ace15c5bffcd4fbdf.tar.bz2
Merge branch 'backport-cxxmodules-export-file-collisions'
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r--Source/cmExportFileGenerator.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index e2c3edd..f332007 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -1587,7 +1587,8 @@ void cmExportFileGenerator::GenerateTargetFileSets(cmGeneratorTarget* gte,
}
}
-void cmExportFileGenerator::GenerateCxxModuleInformation(std::ostream& os)
+void cmExportFileGenerator::GenerateCxxModuleInformation(
+ std::string const& name, std::ostream& os)
{
auto const cxx_module_dirname = this->GetCxxModulesDirectory();
if (cxx_module_dirname.empty()) {
@@ -1597,19 +1598,19 @@ void cmExportFileGenerator::GenerateCxxModuleInformation(std::ostream& os)
// Write the include.
os << "# Include C++ module properties\n"
<< "include(\"${CMAKE_CURRENT_LIST_DIR}/" << cxx_module_dirname
- << "/cxx-modules.cmake\")\n\n";
+ << "/cxx-modules-" << name << ".cmake\")\n\n";
// Get the path to the file we're going to write.
std::string path = this->MainImportFile;
path = cmSystemTools::GetFilenamePath(path);
auto trampoline_path =
- cmStrCat(path, '/', cxx_module_dirname, "/cxx-modules.cmake");
+ cmStrCat(path, '/', cxx_module_dirname, "/cxx-modules-", name, ".cmake");
// Include all configuration-specific include files.
cmGeneratedFileStream ap(trampoline_path, true);
ap.SetCopyIfDifferent(true);
- this->GenerateCxxModuleConfigInformation(ap);
+ this->GenerateCxxModuleConfigInformation(name, ap);
}
void cmExportFileGenerator::SetRequiredCMakeVersion(unsigned int major,