FIX: fix for bug 1606

This commit is contained in:
Bill Hoffman 2005-02-17 10:39:59 -05:00
parent 6d487c33d4
commit 761cbed509
1 changed files with 8 additions and 8 deletions

View File

@ -542,15 +542,14 @@ void cmLocalVisualStudio7Generator::FillFlagMapFromCommandFlags(
std::string replace;
while(flagTable->IDEName)
{
if(flags.find(flagTable->commandFlag) != flags.npos)
std::string regex = "((/|-)";
regex += flagTable->commandFlag;
regex += ")";
cmsys::RegularExpression reg(regex.c_str());
while(reg.find(flags))
{
// replace -flag
replace = "-";
replace += flagTable->commandFlag;
cmSystemTools::ReplaceString(flags, replace.c_str(), "");
// now replace /flag
replace[0] = '/';
cmSystemTools::ReplaceString(flags, replace.c_str(), "");
// replace the flag
cmSystemTools::ReplaceString(flags, reg.match(1).c_str(), "");
// now put value into flag map
flagMap[flagTable->IDEName] = flagTable->value;
}
@ -559,6 +558,7 @@ void cmLocalVisualStudio7Generator::FillFlagMapFromCommandFlags(
}
void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
const char* configName,
const char *libName,