3 This file is part of builder
4 Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
13 Adds another BuildInfo to the end of this one.
15 void BuildInfo::add(const BuildInfo &bi)
17 cflags.insert(cflags.end(), bi.cflags.begin(), bi.cflags.end());
18 defines.insert(defines.end(), bi.defines.begin(), bi.defines.end());
19 incpath.insert(incpath.end(), bi.incpath.begin(), bi.incpath.end());
20 ldflags.insert(ldflags.end(), bi.ldflags.begin(), bi.ldflags.end());
21 libpath.insert(libpath.end(), bi.libpath.begin(), bi.libpath.end());
22 libs.insert(libs.end(), bi.libs.begin(), bi.libs.end());
26 Makes sure there are no duplicate entries in the lists.
28 void BuildInfo::unique()
39 Removes any duplicate entries from a list, leaving only the first one. The
40 order of other elements is preserved. O(n²) efficiency.
42 void BuildInfo::unique(StringList &l)
45 for(StringList::iterator i=l.begin(); i!=l.end(); ++i)
46 if(find(l2.begin(), l2.end(), *i)==l2.end())
51 BuildInfo::Loader::Loader(BuildInfo &bi):
54 add("cflag", &Loader::cflag);
55 add("incpath", &Loader::incpath);
56 add("define", &Loader::define);
57 add("ldflag", &Loader::ldflag);
58 add("libpath", &Loader::libpath);
59 add("library", &Loader::library);