summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-14 12:24:24 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-15 12:34:46 (GMT)
commitca343dad0782733e5e39e7f1427d613e1cad5cf9 (patch)
treed4c0827b5c3de3ab0da7ab2af5bfa89317b9bb1c
parentaf7de05853f9ced4703b7dc470f7eb475f1ede9c (diff)
downloadCMake-ca343dad0782733e5e39e7f1427d613e1cad5cf9.zip
CMake-ca343dad0782733e5e39e7f1427d613e1cad5cf9.tar.gz
CMake-ca343dad0782733e5e39e7f1427d613e1cad5cf9.tar.bz2
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.
-rw-r--r--Source/cmOutputConverter.cxx2
1 files changed, 1 insertions, 1 deletions
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)) {