]> git.tdb.fi Git - builder.git/blobdiff - source/binary.cpp
Store problems at their source rather than globally
[builder.git] / source / binary.cpp
index 9f0bfcd2e5aa273fd11fc878ec1bfe4c8d9a22a3..e7b5e818d4e42f3f78272347d1258ec7e883cb49 100644 (file)
@@ -33,6 +33,7 @@ void Binary::find_dependencies()
 
        list<const Component *> queue;
        list<Target *> dep_libs;
+       set<string> missing_libs;
        queue.push_back(component);
        while(!queue.empty())
        {
@@ -56,8 +57,8 @@ void Binary::find_dependencies()
                                else
                                        dep_libs.push_back(lib);
                        }
-                       else
-                               builder.problem(package->get_name(), format("Couldn't find library %s for %s", *i, name));
+                       else if(missing_libs.insert(*i).second)
+                               problems.push_back(format("Required library %s not found", *i));
                }
        }