]> git.tdb.fi Git - builder.git/commitdiff
Pass language standards through dependencies
authorMikko Rasa <tdb@tdb.fi>
Tue, 13 Oct 2015 19:32:20 +0000 (22:32 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 13 Oct 2015 19:32:20 +0000 (22:32 +0300)
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).

source/buildinfo.cpp

index 1d598caa7a42a56178d25cee7b9f35800f903098..8143235380b9ecb81059338066e9032149c1f4d3 100644 (file)
@@ -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;