mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-19 19:43:23 +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:
|
keys:
|
||||||
|
|
||||||
``path``
|
``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``
|
``mode``
|
||||||
The mode which found the file. One of ``module``, ``cps``, ``cmake``, or
|
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:
|
found, this is ``null``. Keys available:
|
||||||
|
|
||||||
``path``
|
``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``
|
``mode``
|
||||||
The mode that considered the path. One of ``module``, ``cps``, ``cmake``,
|
The mode that considered the path. One of ``module``, ``cps``, ``cmake``,
|
||||||
|
@@ -1121,13 +1121,24 @@ bool cmFindPackageCommand::FindPackage(
|
|||||||
if (!providerCommand(listFileArgs, this->Status)) {
|
if (!providerCommand(listFileArgs, this->Status)) {
|
||||||
return false;
|
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->Makefile->IsOn(cmStrCat(this->Name, "_FOUND"))) {
|
||||||
if (this->DebugModeEnabled()) {
|
if (this->DebugModeEnabled()) {
|
||||||
this->DebugMessage("Package was found by the dependency provider");
|
this->DebugMessage("Package was found by the dependency provider");
|
||||||
}
|
}
|
||||||
|
this->FileFound = searchPath;
|
||||||
|
this->FileFoundMode = FoundPackageMode::Provider;
|
||||||
this->AppendSuccessInformation();
|
this->AppendSuccessInformation();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
this->ConsideredPaths.emplace_back(searchPath, FoundPackageMode::Provider,
|
||||||
|
SearchResult::NotFound);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Limit package nesting depth well below the recursion depth limit because
|
// Limit package nesting depth well below the recursion depth limit because
|
||||||
|
Reference in New Issue
Block a user