FIX: fix for bug 1606

This commit is contained in:
Bill Hoffman 2005-02-17 10:39:59 -05:00
parent 6d487c33d4
commit 761cbed509

View File

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