diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-11-26 17:55:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-11-26 18:45:06 (GMT) |
commit | 7d674b5f0b28a610333644d417c2e8cb796cc9e4 (patch) | |
tree | 362847564a783ffb8fe9580fa98df3627a12372c /Source/cmMakefile.cxx | |
parent | d2f2a2e226a8717d6fdb6df0ed4858d1629f557c (diff) | |
download | CMake-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/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 0bd1624..b7e89b8 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -102,7 +102,6 @@ cmMakefile::cmMakefile(): Internal(new Internals) this->PreOrder = false; this->GeneratingBuildSystem = false; - this->NumLastMatches = 0; this->SuppressWatches = false; } @@ -153,7 +152,6 @@ cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals) this->ListFileStack = mf.ListFileStack; this->OutputToSource = mf.OutputToSource; - this->NumLastMatches = mf.NumLastMatches; this->SuppressWatches = mf.SuppressWatches; } @@ -4743,51 +4741,6 @@ std::vector<cmSourceFile*> cmMakefile::GetQtUiFilesWithOptions() const return this->QtUiFilesWithOptions; } -static std::string matchVariables[] = { - "CMAKE_MATCH_0", - "CMAKE_MATCH_1", - "CMAKE_MATCH_2", - "CMAKE_MATCH_3", - "CMAKE_MATCH_4", - "CMAKE_MATCH_5", - "CMAKE_MATCH_6", - "CMAKE_MATCH_7", - "CMAKE_MATCH_8", - "CMAKE_MATCH_9" -}; - -//---------------------------------------------------------------------------- -void cmMakefile::ClearMatches() -{ - for (unsigned int i=0; i<this->NumLastMatches; i++) - { - std::string const& var = matchVariables[i]; - std::string const& s = this->GetSafeDefinition(var); - if(!s.empty()) - { - this->AddDefinition(var, ""); - this->MarkVariableAsUsed(var); - } - } - this->NumLastMatches = 0; -} - -//---------------------------------------------------------------------------- -void cmMakefile::StoreMatches(cmsys::RegularExpression& re) -{ - for (unsigned int i=0; i<10; i++) - { - std::string const& m = re.match(i); - if(!m.empty()) - { - std::string const& var = matchVariables[i]; - this->AddDefinition(var, m.c_str()); - this->MarkVariableAsUsed(var); - this->NumLastMatches = i + 1; - } - } -} - //---------------------------------------------------------------------------- cmPolicies::PolicyStatus cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const |