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:
Brad King 2017-05-17 13:19:15 -04:00
parent 70c6557285
commit 5a913794d2

View File

@ -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.