summaryrefslogtreecommitdiffstats
path: root/Source/cmConditionEvaluator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-11-26 17:55:44 (GMT)
committerBrad King <brad.king@kitware.com>2014-11-26 18:45:06 (GMT)
commit7d674b5f0b28a610333644d417c2e8cb796cc9e4 (patch)
tree362847564a783ffb8fe9580fa98df3627a12372c /Source/cmConditionEvaluator.cxx
parentd2f2a2e226a8717d6fdb6df0ed4858d1629f557c (diff)
downloadCMake-7d674b5f0b28a610333644d417c2e8cb796cc9e4.zip
CMake-7d674b5f0b28a610333644d417c2e8cb796cc9e4.tar.gz
CMake-7d674b5f0b28a610333644d417c2e8cb796cc9e4.tar.bz2
Revert "ClearMatches: Only clear matches which were actually set" (#15261)
This reverts commit v3.1.0-rc1~557^2~2 (ClearMatches: Only clear matches which were actually set, 2014-03-12). The optimization did not track the match count in the same scope as the variables, allowing possible inconsistency. Resolve conflicts in Source/cmIfCommand.cxx, Source/cmMakefile.cxx, and Source/cmMakefile.h by moving the changes to the new location of the code involved.
Diffstat (limited to 'Source/cmConditionEvaluator.cxx')
-rw-r--r--Source/cmConditionEvaluator.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index aba26de..6065b8a 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -11,6 +11,7 @@
============================================================================*/
#include "cmConditionEvaluator.h"
+#include "cmStringCommand.h"
cmConditionEvaluator::cmConditionEvaluator(cmMakefile& makefile):
Makefile(makefile),
@@ -555,7 +556,7 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList &newArgs,
{
def = this->GetVariableOrString(*arg);
const char* rex = argP2->c_str();
- this->Makefile.ClearMatches();
+ cmStringCommand::ClearMatches(&this->Makefile);
cmsys::RegularExpression regEntry;
if ( !regEntry.compile(rex) )
{
@@ -567,7 +568,7 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList &newArgs,
}
if (regEntry.find(def))
{
- this->Makefile.StoreMatches(regEntry);
+ cmStringCommand::StoreMatches(&this->Makefile, regEntry);
*arg = cmExpandedCommandArgument("1", true);
}
else