ClearMatches: Only clear matches which were actually set

ClearMatches was clearing many variables which were never set in the
first place. Instead, store how many matches were made last time and
only clear those. It is moved to the cmMakefile class since it is a
common utility used by multiple commands.
This commit is contained in:
Ben Boeckel
2014-03-12 14:23:12 -04:00
parent bb1c41a085
commit f718b30a95
5 changed files with 53 additions and 42 deletions
-2
View File
@@ -53,8 +53,6 @@ public:
virtual std::string GetName() const { return "string";}
cmTypeMacro(cmStringCommand, cmCommand);
static void ClearMatches(cmMakefile* mf);
static void StoreMatches(cmMakefile* mf, cmsys::RegularExpression& re);
protected:
bool HandleConfigureCommand(std::vector<std::string> const& args);
bool HandleAsciiCommand(std::vector<std::string> const& args);