cmTransformDepfile: Fix processing filenames with $ and # in them

This commit is contained in:
Tad Hardesty
2026-06-03 15:26:53 -07:00
parent 80f1d73512
commit 2253c1d7c7

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;