summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-05-10 18:43:55 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-05-10 18:43:55 (GMT)
commit76dd86b410d0b09e33d2a93d0b4a27b4a8ee7016 (patch)
tree6e81c6636ecb286373ce65b320843b4c8e80b6d3 /Source
parent0577543cbc8168ffe74bef808a084e339e0929f2 (diff)
downloadCMake-76dd86b410d0b09e33d2a93d0b4a27b4a8ee7016.zip
CMake-76dd86b410d0b09e33d2a93d0b4a27b4a8ee7016.tar.gz
CMake-76dd86b410d0b09e33d2a93d0b4a27b4a8ee7016.tar.bz2
BUG: fix -D escaped quotes for watcom
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx1
-rw-r--r--Source/cmLocalGenerator.h2
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx17
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.h3
4 files changed, 22 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index ec78daf..5d7dcde 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2074,6 +2074,7 @@ void cmLocalGenerator::AppendFlags(std::string& flags,
{
if(newFlags && *newFlags)
{
+ std::string newf = newFlags;
if(flags.size())
{
flags += " ";
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 58a5a11..38b4c0b 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -131,7 +131,7 @@ public:
void AddSharedFlags(std::string& flags, const char* lang, bool shared);
void AddConfigVariableFlags(std::string& flags, const char* var,
const char* config);
- void AppendFlags(std::string& flags, const char* newFlags);
+ virtual void AppendFlags(std::string& flags, const char* newFlags);
///! Get the include flags for the current makefile and language
const char* GetIncludeFlags(const char* lang);
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index a48bebb..5370750 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -806,6 +806,23 @@ cmLocalUnixMakefileGenerator3::GetRelativeTargetDirectory(cmTarget& target)
//----------------------------------------------------------------------------
+void cmLocalUnixMakefileGenerator3::AppendFlags(std::string& flags,
+ const char* newFlags)
+{
+ if(this->WatcomWMake && newFlags && *newFlags)
+ {
+ std::string newf = newFlags;
+ if(newf.find("\\\"") != newf.npos)
+ {
+ cmSystemTools::ReplaceString(newf, "\\\"", "\"");
+ this->cmLocalGenerator::AppendFlags(flags, newf.c_str());
+ return;
+ }
+ }
+ this->cmLocalGenerator::AppendFlags(flags, newFlags);
+}
+
+//----------------------------------------------------------------------------
void
cmLocalUnixMakefileGenerator3
::AppendRuleDepend(std::vector<std::string>& depends,
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 9d2b4c3..07d1f95 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -177,6 +177,9 @@ public:
/** used to create a recursive make call */
std::string GetRecursiveMakeCall(const char *makefile, const char* tgt);
+ // append flags to a string
+ virtual void AppendFlags(std::string& flags, const char* newFlags);
+
// append an echo command
enum EchoColor { EchoNormal, EchoDepend, EchoBuild, EchoLink,
EchoGenerate, EchoGlobal };