diff options
Diffstat (limited to 'Source/cmOutputConverter.cxx')
-rw-r--r-- | Source/cmOutputConverter.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 9c30d74..f4a8d0c 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -275,6 +275,9 @@ std::string cmOutputConverter::EscapeForShell(cm::string_view str, if (this->GetState()->UseNMake()) { flags |= Shell_Flag_NMake; } + if (this->GetState()->UseNinja()) { + flags |= Shell_Flag_Ninja; + } if (!this->GetState()->UseWindowsShell()) { flags |= Shell_Flag_IsUnix; } @@ -677,6 +680,12 @@ std::string cmOutputConverter::Shell_GetArgument(cm::string_view in, int flags) /* Otherwise a semicolon is written just ;. */ out += ';'; } + } else if (*cit == '\n') { + if (flags & Shell_Flag_Ninja) { + out += "$\n"; + } else { + out += '\n'; + } } else { /* Store this character. */ out += *cit; |