ENH: fix problem with watcom and short paths and -I

This commit is contained in:
Bill Hoffman
2006-01-23 13:50:23 -05:00
parent 5c692ee247
commit 7f237c51f4
3 changed files with 21 additions and 3 deletions
+17 -2
View File
@@ -1049,7 +1049,11 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
flagVar = "CMAKE_INCLUDE_FLAG_SEP_";
flagVar += lang;
const char* sep = m_Makefile->GetDefinition(flagVar.c_str());
bool quotePaths = false;
if(m_Makefile->GetDefinition("CMAKE_QUOTE_INCLUDE_PATHS"))
{
quotePaths = true;
}
bool repeatFlag = true; // should the include flag be repeated like ie. -IA -IB
if(!sep)
{
@@ -1084,7 +1088,18 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
includeFlags << includeFlag;
flagUsed = true;
}
includeFlags << this->ConvertToOutputForExisting(i->c_str()) << sep;
includeFlags;
std::string includePath = this->ConvertToOutputForExisting(i->c_str());
if(quotePaths && includePath.size() && includePath[0] != '\"')
{
includeFlags << "\"";
}
includeFlags << includePath;
if(quotePaths && includePath.size() && includePath[0] != '\"')
{
includeFlags << "\"";
}
includeFlags << sep;
}
std::string flags = includeFlags.str();
// remove trailing separators