1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-19 11:18:40 +08:00

Makefiles: Convert paths with '#' on command-lines to short path on Windows

In `ConvertToOutputForExisting` we convert paths with spaces to short
paths on Windows for use on command lines, e.g. for include directories.
Do the same for paths with `#` since tools like NMake do not have a way
to reliably put `#` in variable assignments.
This commit is contained in:
Brad King
2020-04-14 08:24:24 -04:00
parent af7de05853
commit ca343dad07

View File

@@ -26,7 +26,7 @@ std::string cmOutputConverter::ConvertToOutputForExisting(
// already exists, we can use a short-path to reference it without a
// space.
if (this->GetState()->UseWindowsShell() &&
remote.find(' ') != std::string::npos &&
remote.find_first_of(" #") != std::string::npos &&
cmSystemTools::FileExists(remote)) {
std::string tmp;
if (cmSystemTools::GetShortPath(remote, tmp)) {