mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-01 04:03:24 +03: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:
1 parent
70c6557285
commit
5a913794d2
1 file changed
+3
-1
@@ -294,9 +294,11 @@ void cmComputeTargetDepends::AddInterfaceDepends(
|
||||
}
|
||||
|
||||
if (dependee) {
|
||||
this->AddInterfaceDepends(depender_index, dependee, "", emitted);
|
||||
std::vector<std::string> configs;
|
||||
depender->Makefile->GetConfigurations(configs);
|
||||
if (configs.empty()) {
|
||||
configs.push_back("");
|
||||
}
|
||||
for (std::vector<std::string>::const_iterator it = configs.begin();
|
||||
it != configs.end(); ++it) {
|
||||
// A target should not depend on itself.
|
||||
|
||||
Reference in new issue
Block a user