From 97a68198c9ef7dff197a61d40f2a4d52f1a793c1 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 19 Apr 2022 11:00:42 -0400 Subject: 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. --- Source/cmGlobalNinjaGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- cgit v0.12