X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbinary.cpp;h=b3b882d314427f6bf8efdd73b50210edd50d1112;hb=1c42eb92bc1f07baecbb8752e532608426621c05;hp=05a475d71bb4b02ff82c8333f06cc1c976f6d40e;hpb=3f1f24c02c5ef21791e5b24ff535d59969cd7625;p=builder.git diff --git a/source/binary.cpp b/source/binary.cpp index 05a475d..b3b882d 100644 --- a/source/binary.cpp +++ b/source/binary.cpp @@ -18,7 +18,7 @@ Binary::Binary(Builder &b, const FS::Path &p): { } Binary::Binary(Builder &b, const Component &c, const string &p, const list &objs): - FileTarget(b, c.get_package(), c.get_package().get_out_dir()/p), + FileTarget(b, c.get_package(), c.get_package().get_output_directory()/p), objects(objs) { component = &c; @@ -33,6 +33,7 @@ void Binary::find_dependencies() list queue; list dep_libs; + set missing_libs; queue.push_back(component); while(!queue.empty()) { @@ -42,6 +43,9 @@ void Binary::find_dependencies() const BuildInfo &binfo = c->get_build_info(); for(BuildInfo::WordList::const_iterator i=binfo.libs.begin(); i!=binfo.libs.end(); ++i) { + if(i->size()>10 && !i->compare(i->size()-10, 10, ".framework")) + continue; + BuildInfo::LibraryMode libmode = component->get_build_info().get_libmode_for(*i); Target *lib = builder.get_vfs().find_library(*i, binfo.libpath, libmode); if(lib) @@ -56,8 +60,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)); } } @@ -80,10 +84,12 @@ string Binary::create_build_signature() const object_tools.insert((*i)->get_tool()); list sigs; - sigs.push_back(tool->create_build_signature(component->get_build_info())); for(set::const_iterator i=object_tools.begin(); i!=object_tools.end(); ++i) sigs.push_back((*i)->create_build_signature(component->get_build_info())); sigs.sort(); + sigs.push_front(tool->create_build_signature(component->get_build_info())); + if(const Architecture *arch = tool->get_architecture()) + sigs.push_front(arch->get_name()); return join(sigs.begin(), sigs.end(), ";"); }