using namespace Msp;
GnuCxxCompiler::GnuCxxCompiler(Builder &b, const Architecture &a):
- GnuCompiler(b, a, "CXX", "g++")
+ GnuCompiler(b, a, "CXX")
{
+ set_command("g++", true);
input_suffixes.push_back(".cpp");
input_suffixes.push_back(".cc");
aux_suffixes.push_back(".hpp");
+}
+void GnuCxxCompiler::query_version()
+{
ExternalTask::Arguments argv;
argv.push_back(executable->get_path().str());
argv.push_back("-dumpversion");
{
return new CSourceFile(builder, path);
}
+
+void GnuCxxCompiler::do_prepare()
+{
+ GnuCompiler::do_prepare();
+ executable = builder.get_vfs().find_binary(command);
+ if(executable)
+ query_version();
+}