diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-02-17 15:39:59 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-02-17 15:39:59 (GMT) |
commit | 761cbed509803f8fce4c80447470b9eae67bba14 (patch) | |
tree | 02b3b39e201f7fde596262f6f63624c9d035ac9e /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 6d487c33d43d5daf7f066441f6086ea609bfa44b (diff) | |
download | CMake-761cbed509803f8fce4c80447470b9eae67bba14.zip CMake-761cbed509803f8fce4c80447470b9eae67bba14.tar.gz CMake-761cbed509803f8fce4c80447470b9eae67bba14.tar.bz2 |
FIX: fix for bug 1606
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 87fe048..06d12f1 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -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, |