diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-19 15:00:42 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-27 18:30:41 (GMT) |
commit | 97a68198c9ef7dff197a61d40f2a4d52f1a793c1 (patch) | |
tree | f5b6a0d755ba680693a720294d172caa325ee3c9 /Source/cmGlobalNinjaGenerator.cxx | |
parent | 499009b79cdb48646b87a661e18ca903a3ae7e0f (diff) | |
download | CMake-97a68198c9ef7dff197a61d40f2a4d52f1a793c1.zip CMake-97a68198c9ef7dff197a61d40f2a4d52f1a793c1.tar.gz CMake-97a68198c9ef7dff197a61d40f2a4d52f1a793c1.tar.bz2 |
cmGlobalNinjaGenerator: escape `:` in module names
Not all filesystems support `:` in the name, so replace it with `-`. As
`-` is not otherwise allowed in module names anyways, there is no risk
of conflict.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index bbc9c54..03db601 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -2550,7 +2550,9 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile( } } else { // Assume the module file path matches the logical module name. - mod = cmStrCat(module_dir, p.LogicalName); + std::string safe_logical_name = p.LogicalName; + cmSystemTools::ReplaceString(safe_logical_name, ":", "-"); + mod = cmStrCat(module_dir, safe_logical_name); } mod_files[p.LogicalName] = mod; tm[p.LogicalName] = mod; |