Some compilers return non-numeric version components, like 4.9.x. This
change keeps values of all the initial numeric components.
argv.push_back(arg);
builder.get_logger().log("auxcommands", "Running %s", join(argv.begin(), argv.end()));
+ unsigned ver = 0;
try
{
string version_str = strip(ExternalTask::run_and_capture_output(argv));
vector<string> version_parts = split(version_str, '.');
- unsigned ver = 0;
for(unsigned i=0; (i<3 && i<version_parts.size()); ++i)
ver |= lexical_cast<unsigned>(version_parts[i])<<(16-8*i);
- return ver;
}
catch(const runtime_error &)
{ }
- return 0;
+ return ver;
}
Task *GnuCompiler::_run(const ObjectFile &object)