@@ -516,24 +516,30 @@ Commands SwBuild::getCommands() const
516516 std::function<void (const TargetSettings &)> process_deps;
517517 process_deps = [this , &gather_ttb, &process_deps, &ttb](const auto &s) mutable
518518 {
519- for ( auto &[k, v] : s[ " dependencies " ][ " link " ]. getSettings () )
519+ auto get_deps = [ this , &gather_ttb, &process_deps, &ttb]( const auto &in )
520520 {
521- auto i = getTargets ().find (PackageId (k));
522- if (i == getTargets ().end ())
523- throw SW_RUNTIME_ERROR (" dep not found" );
524- auto j = i->second .findSuitable (v.getSettings ());
525- if (j == i->second .end ())
526- throw SW_RUNTIME_ERROR (" dep+settings not found" );
527-
528- auto m = ttb[PackageId (k)].findEqual ((*j)->getSettings ());
529- if (m != ttb[PackageId (k)].end ())
530- continue ;
531- ttb[PackageId (k)].push_back (*j);
532-
533- const auto &s = (*j)->getInterfaceSettings ();
534- gather_ttb (s);
535- process_deps (s);
536- }
521+ for (auto &[k, v] : in)
522+ {
523+ auto i = getTargets ().find (PackageId (k));
524+ if (i == getTargets ().end ())
525+ throw SW_RUNTIME_ERROR (" dep not found" );
526+ auto j = i->second .findSuitable (v.getSettings ());
527+ if (j == i->second .end ())
528+ throw SW_RUNTIME_ERROR (" dep+settings not found" );
529+
530+ auto m = ttb[PackageId (k)].findEqual ((*j)->getSettings ());
531+ if (m != ttb[PackageId (k)].end ())
532+ continue ;
533+ ttb[PackageId (k)].push_back (*j);
534+
535+ const auto &s = (*j)->getInterfaceSettings ();
536+ gather_ttb (s);
537+ process_deps (s);
538+ }
539+ };
540+
541+ get_deps (s[" dependencies" ][" link" ].getSettings ());
542+ get_deps (s[" dependencies" ][" dummy" ].getSettings ());
537543 };
538544
539545 process_deps (s);
0 commit comments