summaryrefslogtreecommitdiff
path: root/Source/cmOutputConverter.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-14 08:24:24 -0400
committerBrad King <brad.king@kitware.com>2020-04-15 08:34:46 -0400
commitca343dad0782733e5e39e7f1427d613e1cad5cf9 (patch)
treed4c0827b5c3de3ab0da7ab2af5bfa89317b9bb1c /Source/cmOutputConverter.cxx
parentaf7de05853f9ced4703b7dc470f7eb475f1ede9c (diff)
downloadcmake-ca343dad0782733e5e39e7f1427d613e1cad5cf9.tar.gz
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.
Diffstat (limited to 'Source/cmOutputConverter.cxx')
-rw-r--r--Source/cmOutputConverter.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx
index 1c6fad1482..68bf3af756 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)) {