diff --git a/Source/cmDyndepCollation.cxx b/Source/cmDyndepCollation.cxx index 800b395e9a..e6ffe5ac33 100644 --- a/Source/cmDyndepCollation.cxx +++ b/Source/cmDyndepCollation.cxx @@ -644,6 +644,9 @@ bool cmDyndepCollation::WriteDyndepMetadata( result = false; } } + for (auto const& req : object.Requires) { + bdb_entry->second->Requires.push_back(req.LogicalName); + } } else if (export_info.DatabaseInfo) { cmSystemTools::Error(cmStrCat( "Failed to find module database entry for ", file_set.SourcePath));