MCPcopy Create free account
hub / github.com/Kitware/CMake / StoreMatches

Method StoreMatches

Source/cmMakefile.cxx:4034–4049  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4032}
4033
4034void cmMakefile::StoreMatches(cmsys::RegularExpression& re)
4035{
4036 char highest = 0;
4037 for (int i = 0; i < 10; i++) {
4038 std::string const& m = re.match(i);
4039 if (!m.empty()) {
4040 std::string const& var = matchVariables[i];
4041 this->AddDefinition(var, m);
4042 this->MarkVariableAsUsed(var);
4043 highest = static_cast<char>('0' + i);
4044 }
4045 }
4046 char nMatches[] = { highest, '\0' };
4047 this->AddDefinition(nMatchesVariable, nMatches);
4048 this->MarkVariableAsUsed(nMatchesVariable);
4049}
4050
4051cmStateSnapshot cmMakefile::GetStateSnapshot() const
4052{

Callers 4

HandleLevel2Method · 0.80
ReplaceMethod · 0.80
MatchMethod · 0.80
HandleStringsCommandFunction · 0.80

Calls 4

AddDefinitionMethod · 0.95
MarkVariableAsUsedMethod · 0.95
matchMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected