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

Method AppendSuccessInformation

Source/cmFindPackageCommand.cxx:2306–2347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2304}
2305
2306void cmFindPackageCommand::AppendSuccessInformation()
2307{
2308 {
2309 std::string const transitivePropName =
2310 cmStrCat("_CMAKE_", this->Name, "_TRANSITIVE_DEPENDENCY");
2311 this->Makefile->GetState()->SetGlobalProperty(transitivePropName, "False");
2312 }
2313 std::string const found = cmStrCat(this->Name, "_FOUND");
2314 std::string const upperFound = cmSystemTools::UpperCase(found);
2315
2316 bool const upperResult = this->Makefile->IsOn(upperFound);
2317 bool const result = this->Makefile->IsOn(found);
2318 bool const packageFound = (result || upperResult);
2319
2320 this->AppendToFoundProperty(packageFound);
2321
2322 // Record whether the find was quiet or not, so this can be used
2323 // e.g. in FeatureSummary.cmake
2324 std::string const quietInfoPropName =
2325 cmStrCat("_CMAKE_", this->Name, "_QUIET");
2326 this->Makefile->GetState()->SetGlobalProperty(
2327 quietInfoPropName, this->Quiet ? "TRUE" : "FALSE");
2328
2329 // set a global property to record the required version of this package
2330 std::string const versionInfoPropName =
2331 cmStrCat("_CMAKE_", this->Name, "_REQUIRED_VERSION");
2332 std::string versionInfo;
2333 if (!this->VersionRange.empty()) {
2334 versionInfo = this->VersionRange;
2335 } else if (!this->Version.empty()) {
2336 versionInfo =
2337 cmStrCat(this->VersionExact ? "==" : ">=", ' ', this->Version);
2338 }
2339 this->Makefile->GetState()->SetGlobalProperty(versionInfoPropName,
2340 versionInfo);
2341 if (this->IsRequired()) {
2342 std::string const requiredInfoPropName =
2343 cmStrCat("_CMAKE_", this->Name, "_TYPE");
2344 this->Makefile->GetState()->SetGlobalProperty(requiredInfoPropName,
2345 "REQUIRED");
2346 }
2347}
2348
2349void cmFindPackageCommand::PushFindPackageRootPathStack()
2350{

Callers 1

FindPackageMethod · 0.95

Calls 7

AppendToFoundPropertyMethod · 0.95
IsRequiredMethod · 0.95
SetGlobalPropertyMethod · 0.80
cmStrCatFunction · 0.70
GetStateMethod · 0.45
IsOnMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected