diff options
author | Jiri Malak <malak.jiri@gmail.com> | 2023-01-24 21:12:28 (GMT) |
---|---|---|
committer | Jiri Malak <malak.jiri@gmail.com> | 2023-01-24 21:12:28 (GMT) |
commit | a1d065e5c7f2b0bb33dc8aea6d10947e46a43abb (patch) | |
tree | 4f7dfaaa52b2b0b2f0d49d4200431500fc148025 /Source/cmOutputConverter.cxx | |
parent | 62483b9b99647bcec8275d7b139a64e879623fcc (diff) | |
download | CMake-a1d065e5c7f2b0bb33dc8aea6d10947e46a43abb.zip CMake-a1d065e5c7f2b0bb33dc8aea6d10947e46a43abb.tar.gz CMake-a1d065e5c7f2b0bb33dc8aea6d10947e46a43abb.tar.bz2 |
Watcom: Replace WATCOMQUOTE format by UseWatcomQuote attribute
Replace WATCOMQUOTE output format by UseWatcomQuote attribute to properly handle single quote
This attribute is used globaly only for Watcom linker to handle single-quote separator instead of double-quote
it doesn't mean different output format only change of quoting separator
It is now applied to any output form SHELL/RESPONSE/NINJAMULTI if Watcom linker is used otherwise double-quote is used
Diffstat (limited to 'Source/cmOutputConverter.cxx')
-rw-r--r-- | Source/cmOutputConverter.cxx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 299ab3a..6c54e01 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -154,7 +154,7 @@ std::string cmOutputConverter::MaybeRelativeToCurBinDir( } std::string cmOutputConverter::ConvertToOutputForExisting( - const std::string& remote, OutputFormat format) const + const std::string& remote, OutputFormat format, bool useWatcomQuote) const { #ifdef _WIN32 // Cache the Short Paths since we only convert the same few paths anyway and @@ -181,25 +181,27 @@ std::string cmOutputConverter::ConvertToOutputForExisting( return tmp; }(); - return this->ConvertToOutputFormat(shortPath, format); + return this->ConvertToOutputFormat(shortPath, format, useWatcomQuote); } #endif // Otherwise, perform standard conversion. - return this->ConvertToOutputFormat(remote, format); + return this->ConvertToOutputFormat(remote, format, useWatcomQuote); } std::string cmOutputConverter::ConvertToOutputFormat(cm::string_view source, - OutputFormat output) const + OutputFormat format, + bool useWatcomQuote) const { std::string result(source); // Convert it to an output path. - if (output == SHELL || output == WATCOMQUOTE || output == NINJAMULTI) { + if (format == SHELL || format == NINJAMULTI) { result = this->ConvertDirectorySeparatorsForShell(source); - result = this->EscapeForShell(result, true, false, output == WATCOMQUOTE, - output == NINJAMULTI); - } else if (output == RESPONSE) { - result = this->EscapeForShell(result, false, false, false, false, true); + result = this->EscapeForShell(result, true, false, useWatcomQuote, + format == NINJAMULTI); + } else if (format == RESPONSE) { + result = + this->EscapeForShell(result, false, false, useWatcomQuote, false, true); } return result; } |