From: Mikko Rasa Date: Fri, 8 Jun 2012 22:58:04 +0000 (+0300) Subject: Make BuildInfo uniquify things implicitly after update X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=50be4619cca4bb44e5abf8759720c255ef6d3b45;p=builder.git Make BuildInfo uniquify things implicitly after update --- diff --git a/source/buildinfo.cpp b/source/buildinfo.cpp index 463357d..ec81567 100644 --- a/source/buildinfo.cpp +++ b/source/buildinfo.cpp @@ -48,6 +48,8 @@ void BuildInfo::update_from(const BuildInfo &bi, UpdateLevel level) optimize = bi.optimize; strip = bi.strip; } + + unique(); } void BuildInfo::unique() diff --git a/source/buildinfo.h b/source/buildinfo.h index 18f33a0..297efff 100644 --- a/source/buildinfo.h +++ b/source/buildinfo.h @@ -52,6 +52,7 @@ public: The update level determines what information is updated. */ void update_from(const BuildInfo &, UpdateLevel = LOCAL); +private: /** Makes sure there are no duplicate entries in the lists. For warnings, contradicting flags are eliminated and the last one stays in effect. */ void unique(); diff --git a/source/component.cpp b/source/component.cpp index cc4796c..c4908c9 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -77,8 +77,6 @@ void Component::create_build_info() if(type==PROGRAM) build_info.strip = lexical_cast(pkg.get_config().get_option("strip").value); - - build_info.unique(); } void Component::create_targets() const diff --git a/source/sourcepackage.cpp b/source/sourcepackage.cpp index 60276da..7d0ed1d 100644 --- a/source/sourcepackage.cpp +++ b/source/sourcepackage.cpp @@ -218,16 +218,12 @@ void SourcePackage::create_build_info() if(i->eval()) build_info.update_from(i->get_build_info()); - build_info.unique(); - for(list::iterator i=components.begin(); i!=components.end(); ++i) { i->create_build_info(); if(i->get_type()==Component::LIBRARY) export_binfo.libs.push_back(i->get_name()); } - - export_binfo.unique(); }