summaryrefslogtreecommitdiffstats
path: root/Source/cmIfCommand.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-03-12 18:23:12 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2014-04-29 20:00:05 (GMT)
commitf718b30a95e07d72a361d55b7ba495eda5d79680 (patch)
tree5f06d51f999483a1e111fa2969d7a0d125356b55 /Source/cmIfCommand.cxx
parentbb1c41a085c6eb9296bf701ea7633f715a06f6e1 (diff)
downloadCMake-f718b30a95e07d72a361d55b7ba495eda5d79680.zip
CMake-f718b30a95e07d72a361d55b7ba495eda5d79680.tar.gz
CMake-f718b30a95e07d72a361d55b7ba495eda5d79680.tar.bz2
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.
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r--Source/cmIfCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 06c4b89..1141b01 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -595,7 +595,7 @@ namespace
{
def = cmIfCommand::GetVariableOrString(*arg, makefile);
const char* rex = (argP2)->c_str();
- cmStringCommand::ClearMatches(makefile);
+ makefile->ClearMatches();
cmsys::RegularExpression regEntry;
if ( !regEntry.compile(rex) )
{
@@ -607,7 +607,7 @@ namespace
}
if (regEntry.find(def))
{
- cmStringCommand::StoreMatches(makefile, regEntry);
+ makefile->StoreMatches(regEntry);
*arg = "1";
}
else