diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 1 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 2 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 17 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.h | 3 |
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 }; |