| 3263 | } |
| 3264 | |
| 3265 | void cmFindPackageCommand::StoreVersionFound() |
| 3266 | { |
| 3267 | // Store the whole version string. |
| 3268 | std::string const ver = cmStrCat(this->Name, "_VERSION"); |
| 3269 | auto addDefinition = [this](std::string const& variable, |
| 3270 | cm::string_view value) { |
| 3271 | this->Makefile->AddDefinition(variable, value); |
| 3272 | }; |
| 3273 | |
| 3274 | this->SetVersionVariables(addDefinition, ver, this->VersionFound, |
| 3275 | this->VersionFoundCount, this->VersionFoundMajor, |
| 3276 | this->VersionFoundMinor, this->VersionFoundPatch, |
| 3277 | this->VersionFoundTweak); |
| 3278 | |
| 3279 | if (this->VersionFound.empty()) { |
| 3280 | this->Makefile->RemoveDefinition(ver); |
| 3281 | } |
| 3282 | } |
| 3283 | |
| 3284 | bool cmFindPackageCommand::SearchPrefix(std::string const& prefix) |
| 3285 | { |
no test coverage detected