From ca343dad0782733e5e39e7f1427d613e1cad5cf9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 14 Apr 2020 08:24:24 -0400 Subject: 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. --- Source/cmOutputConverter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 1c6fad1..68bf3af 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -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)) { -- cgit v0.12