| 4013 | static std::string const nMatchesVariable = "CMAKE_MATCH_COUNT"; |
| 4014 | |
| 4015 | void cmMakefile::ClearMatches() |
| 4016 | { |
| 4017 | cmValue nMatchesStr = this->GetDefinition(nMatchesVariable); |
| 4018 | if (!nMatchesStr) { |
| 4019 | return; |
| 4020 | } |
| 4021 | int nMatches = atoi(nMatchesStr->c_str()); |
| 4022 | for (int i = 0; i <= nMatches; i++) { |
| 4023 | std::string const& var = matchVariables[i]; |
| 4024 | std::string const& s = this->GetSafeDefinition(var); |
| 4025 | if (!s.empty()) { |
| 4026 | this->AddDefinition(var, ""); |
| 4027 | this->MarkVariableAsUsed(var); |
| 4028 | } |
| 4029 | } |
| 4030 | this->AddDefinition(nMatchesVariable, "0"); |
| 4031 | this->MarkVariableAsUsed(nMatchesVariable); |
| 4032 | } |
| 4033 | |
| 4034 | void cmMakefile::StoreMatches(cmsys::RegularExpression& re) |
| 4035 | { |
no test coverage detected