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

Method StoreVersionFound

Source/cmFindPackageCommand.cxx:3265–3282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3263}
3264
3265void 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
3284bool cmFindPackageCommand::SearchPrefix(std::string const& prefix)
3285{

Callers 1

HandlePackageModeMethod · 0.95

Calls 5

SetVersionVariablesMethod · 0.95
cmStrCatFunction · 0.70
AddDefinitionMethod · 0.45
emptyMethod · 0.45
RemoveDefinitionMethod · 0.45

Tested by

no test coverage detected