summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGlobalGenerator.cxx18
-rw-r--r--Source/cmGlobalGenerator.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 3e4d657..0e672e6 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -47,6 +47,7 @@
#include "cmMSVC60LinkLineComputer.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
+#include "cmOutputConverter.h"
#include "cmPolicies.h"
#include "cmRange.h"
#include "cmSourceFile.h"
@@ -73,6 +74,23 @@ const std::string kCMAKE_PLATFORM_INFO_INITIALIZED =
class cmInstalledFile;
+namespace detail {
+std::string GeneratedMakeCommand::QuotedPrintable() const
+{
+ std::string output;
+ const char* sep = "";
+ int flags = 0;
+#if !defined(_WIN32)
+ flags |= cmOutputConverter::Shell_Flag_IsUnix;
+#endif
+ for (auto const& arg : this->PrimaryCommand) {
+ output += cmStrCat(sep, cmOutputConverter::EscapeForShell(arg, flags));
+ sep = " ";
+ }
+ return output;
+}
+}
+
bool cmTarget::StrictTargetComparison::operator()(cmTarget const* t1,
cmTarget const* t2) const
{
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 79fe52c..f24465a 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -85,6 +85,7 @@ struct GeneratedMakeCommand
}
std::string Printable() const { return cmJoin(this->PrimaryCommand, " "); }
+ std::string QuotedPrintable() const;
std::vector<std::string> PrimaryCommand;
bool RequiresOutputForward = false;