BUG: fix -D escaped quotes for watcom

This commit is contained in:
Bill Hoffman 2007-05-10 14:43:55 -04:00
parent 0577543cbc
commit 76dd86b410
4 changed files with 22 additions and 1 deletions

View File

@ -2074,6 +2074,7 @@ void cmLocalGenerator::AppendFlags(std::string& flags,
{
if(newFlags && *newFlags)
{
std::string newf = newFlags;
if(flags.size())
{
flags += " ";

View File

@ -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);

View File

@ -805,6 +805,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

View File

@ -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 };