mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 05:10:10 -05:00
cmComputeTargetDepends: Avoid computing with empty configuration
Fix `AddInterfaceDepends` to combine all configurations using the same approach that `CollectTargetDepends` does. Fixes: #16896
This commit is contained in:
@@ -294,9 +294,11 @@ void cmComputeTargetDepends::AddInterfaceDepends(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dependee) {
|
if (dependee) {
|
||||||
this->AddInterfaceDepends(depender_index, dependee, "", emitted);
|
|
||||||
std::vector<std::string> configs;
|
std::vector<std::string> configs;
|
||||||
depender->Makefile->GetConfigurations(configs);
|
depender->Makefile->GetConfigurations(configs);
|
||||||
|
if (configs.empty()) {
|
||||||
|
configs.push_back("");
|
||||||
|
}
|
||||||
for (std::vector<std::string>::const_iterator it = configs.begin();
|
for (std::vector<std::string>::const_iterator it = configs.begin();
|
||||||
it != configs.end(); ++it) {
|
it != configs.end(); ++it) {
|
||||||
// A target should not depend on itself.
|
// A target should not depend on itself.
|
||||||
|
|||||||
Reference in New Issue
Block a user