From: Mikko Rasa Date: Fri, 3 Oct 2014 21:53:09 +0000 (+0300) Subject: Add paths to beginning when merging BuildInfo X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=375526d108ec742a84926e1d458428fd2d0f37f3;p=builder.git Add paths to beginning when merging BuildInfo This is more consistent with how scalars are handled, since earlier values take predecence. --- diff --git a/source/buildinfo.cpp b/source/buildinfo.cpp index 5ea1b34..d346fe6 100644 --- a/source/buildinfo.cpp +++ b/source/buildinfo.cpp @@ -48,16 +48,16 @@ void BuildInfo::update_from(const BuildInfo &bi, UpdateLevel level) { for(DefineMap::const_iterator i=bi.defines.begin(); i!=bi.defines.end(); ++i) defines[i->first] = i->second; - incpath.insert(incpath.end(), bi.incpath.begin(), bi.incpath.end()); + incpath.insert(incpath.begin(), bi.incpath.begin(), bi.incpath.end()); if(level!=CHAINED) { - libpath.insert(libpath.end(), bi.libpath.begin(), bi.libpath.end()); - libs.insert(libs.end(), bi.libs.begin(), bi.libs.end()); + libpath.insert(libpath.begin(), bi.libpath.begin(), bi.libpath.end()); + libs.insert(libs.begin(), bi.libs.begin(), bi.libs.end()); } threads = bi.threads; if(level==LOCAL) { - local_incpath.insert(local_incpath.end(), bi.local_incpath.begin(), bi.local_incpath.end()); + local_incpath.insert(local_incpath.begin(), bi.local_incpath.begin(), bi.local_incpath.end()); libmode = bi.libmode; for(LibModeMap::const_iterator i=bi.libmodes.begin(); i!=bi.libmodes.end(); ++i) libmodes[i->first] = i->second;