From: Mikko Rasa Date: Tue, 13 Oct 2015 19:32:20 +0000 (+0300) Subject: Pass language standards through dependencies X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=0d2231ad2cfa7f08c7962be8ad5df789146b1a20;p=builder.git Pass language standards through dependencies If a library uses a particular standard in its headers, all packages that depend on it should use that standard as well (unless overridden at the package). --- diff --git a/source/buildinfo.cpp b/source/buildinfo.cpp index 1d598ca..8143235 100644 --- a/source/buildinfo.cpp +++ b/source/buildinfo.cpp @@ -53,6 +53,8 @@ void BuildInfo::update_from(const BuildInfo &bi, UpdateLevel level) { libpath.insert(libpath.begin(), bi.libpath.begin(), bi.libpath.end()); libs.insert(libs.begin(), bi.libs.begin(), bi.libs.end()); + for(StandardMap::const_iterator i=bi.standards.begin(); i!=bi.standards.end(); ++i) + standards[i->first] = i->second; } threads = bi.threads; if(level==LOCAL) @@ -63,8 +65,6 @@ void BuildInfo::update_from(const BuildInfo &bi, UpdateLevel level) for(LibModeMap::const_iterator i=bi.libmodes.begin(); i!=bi.libmodes.end(); ++i) libmodes[i->first] = i->second; keep_symbols.insert(keep_symbols.end(), bi.keep_symbols.begin(), bi.keep_symbols.end()); - for(StandardMap::const_iterator i=bi.standards.begin(); i!=bi.standards.end(); ++i) - standards[i->first] = i->second; debug = bi.debug; optimize = bi.optimize; strip = bi.strip;