diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-19 14:59:43 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-27 18:30:41 (GMT) |
commit | cc4e19710d4bc5ad5abe20121ac34e8003fae44e (patch) | |
tree | 669130e427d3ce59da2ab7d734308c35a13c9287 | |
parent | 97a68198c9ef7dff197a61d40f2a4d52f1a793c1 (diff) | |
download | CMake-cc4e19710d4bc5ad5abe20121ac34e8003fae44e.zip CMake-cc4e19710d4bc5ad5abe20121ac34e8003fae44e.tar.gz CMake-cc4e19710d4bc5ad5abe20121ac34e8003fae44e.tar.bz2 |
cmGlobalNinjaGenerator: use an extention based on the modmapfmt
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 03db601..3726aa4 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -2534,6 +2534,11 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile( } } + const char* module_ext = ""; + if (arg_modmapfmt == "gcc") { + module_ext = ".gcm"; + } + // Extend the module map with those provided by this target. // We do this after loading the modules provided by linked targets // in case we have one of the same name that must be preferred. @@ -2552,7 +2557,7 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile( // Assume the module file path matches the logical module name. std::string safe_logical_name = p.LogicalName; cmSystemTools::ReplaceString(safe_logical_name, ":", "-"); - mod = cmStrCat(module_dir, safe_logical_name); + mod = cmStrCat(module_dir, safe_logical_name, module_ext); } mod_files[p.LogicalName] = mod; tm[p.LogicalName] = mod; |