Merge topic 'depfile-transform-escapes' into release-4.4

2253c1d7c7 cmTransformDepfile: Fix processing filenames with `$` and `#` in them

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12142
This commit is contained in:
Brad King
2026-06-05 14:47:45 +00:00
committed by Kitware Robot

View File

@@ -26,6 +26,12 @@ void WriteFilenameGcc(cmsys::ofstream& fout, std::string const& filename)
{
for (auto c : filename) {
switch (c) {
case '$':
fout << "$$";
break;
case '#':
fout << "\\#";
break;
case ' ':
fout << "\\ ";
break;