mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-19 02:17:27 +08:00
configure-log: fill in dependency provider information
This uses the special "path" of `dependency_provider::…` to indicate the provider in use.
This commit is contained in:
@@ -654,7 +654,8 @@ The keys specific to ``find_package-v1`` mappings are:
|
||||
keys:
|
||||
|
||||
``path``
|
||||
The path to the considered file.
|
||||
The path to the considered file. In the case of a dependency provider, the
|
||||
value is in the form of ``dependency_provider::<COMMAND_NAME>``.
|
||||
|
||||
``mode``
|
||||
The mode which found the file. One of ``module``, ``cps``, ``cmake``, or
|
||||
@@ -673,7 +674,9 @@ The keys specific to ``find_package-v1`` mappings are:
|
||||
found, this is ``null``. Keys available:
|
||||
|
||||
``path``
|
||||
The path to the module or configuration that found the package.
|
||||
The path to the module or configuration that found the package. In the
|
||||
case of a dependency provider, the value is in the form of
|
||||
``dependency_provider::<COMMAND_NAME>``.
|
||||
|
||||
``mode``
|
||||
The mode that considered the path. One of ``module``, ``cps``, ``cmake``,
|
||||
|
@@ -1121,13 +1121,24 @@ bool cmFindPackageCommand::FindPackage(
|
||||
if (!providerCommand(listFileArgs, this->Status)) {
|
||||
return false;
|
||||
}
|
||||
std::string providerName;
|
||||
if (auto depProvider = state->GetDependencyProvider()) {
|
||||
providerName = depProvider->GetCommand();
|
||||
} else {
|
||||
providerName = "<no provider?>";
|
||||
}
|
||||
auto searchPath = cmStrCat("dependency_provider::", providerName);
|
||||
if (this->Makefile->IsOn(cmStrCat(this->Name, "_FOUND"))) {
|
||||
if (this->DebugModeEnabled()) {
|
||||
this->DebugMessage("Package was found by the dependency provider");
|
||||
}
|
||||
this->FileFound = searchPath;
|
||||
this->FileFoundMode = FoundPackageMode::Provider;
|
||||
this->AppendSuccessInformation();
|
||||
return true;
|
||||
}
|
||||
this->ConsideredPaths.emplace_back(searchPath, FoundPackageMode::Provider,
|
||||
SearchResult::NotFound);
|
||||
}
|
||||
|
||||
// Limit package nesting depth well below the recursion depth limit because
|
||||
|
Reference in New Issue
Block a user