threads(false),
debug(false),
optimize(0),
- strip(false)
+ strip(false),
+ warning_level(0),
+ fatal_warnings(false)
{ }
void BuildInfo::update_from(const BuildInfo &bi, UpdateLevel level)
libpath.insert(libpath.end(), bi.libpath.begin(), bi.libpath.end());
libs.insert(libs.end(), bi.libs.begin(), bi.libs.end());
}
- warnings.insert(warnings.end(), bi.warnings.begin(), bi.warnings.end());
threads = bi.threads;
if(level==LOCAL)
{
debug = bi.debug;
optimize = bi.optimize;
strip = bi.strip;
+ warning_level = bi.warning_level;
+ fatal_warnings = bi.fatal_warnings;
}
- unique();
-}
-
-void BuildInfo::unique()
-{
- ::unique(incpath);
- ::unique(libpath);
- ::unique(libs);
-
- for(WordList::iterator i=warnings.begin(); i!=warnings.end(); ++i)
- {
- bool flag = i->compare(0, 3, "no-");
-
- string warn = (flag ? *i : i->substr(3));
- string no_warn = "no-"+warn;
-
- for(WordList::iterator j=i; j!=warnings.end();)
- {
- if(j!=i && (*j==warn || *j==no_warn))
- {
- flag = (*j==warn);
- j = warnings.erase(j);
- }
- else
- ++j;
- }
-
- *i = (flag ? warn : no_warn);
- }
+ unique(incpath);
+ unique(libpath);
+ unique(libs);
}
add("optimize", &BuildInfo::optimize);
add("strip", &BuildInfo::strip);
add("threads", &BuildInfo::threads);
- add("warning", &Loader::warning);
+ add("warning_level", &BuildInfo::warning_level);
+ add("fatal_warnings", &BuildInfo::fatal_warnings);
}
void BuildInfo::Loader::incpath(const string &s)
obj.libs.push_back(s);
}
-void BuildInfo::Loader::warning(const string &s)
-{
- obj.warnings.push_back(s);
-}
-
-void operator>>(LexicalConverter &conv, BuildInfo::LibraryMode &libmode)
+void operator>>(const LexicalConverter &conv, BuildInfo::LibraryMode &libmode)
{
if(conv.get()=="FORCE_STATIC")
libmode = BuildInfo::FORCE_STATIC;