mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 11:49:55 -06:00
MinGW Makefiles: Quote UNC paths on command lines
UNC paths (starting with `\\`) need quotes when generating MinGW Makefiles to avoid gmake interpreting the first `\` as an escape character. Fixes: #24061
This commit is contained in:
@@ -527,6 +527,13 @@ bool cmOutputConverter::Shell_ArgumentNeedsQuotes(cm::string_view in,
|
||||
}
|
||||
}
|
||||
|
||||
/* UNC paths in MinGW Makefiles need quotes. */
|
||||
if ((flags & Shell_Flag_MinGWMake) && (flags & Shell_Flag_Make)) {
|
||||
if (in.size() > 1 && in[0] == '\\' && in[1] == '\\') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user