]> git.tdb.fi Git - builder.git/blobdiff - source/gnucxxcompiler.cpp
It's no longer necessary to store the name in GnuCompiler
[builder.git] / source / gnucxxcompiler.cpp
index cadd21f026989df463412668a672b182d188bf5c..9045b6c3a369029a48efb39f386ce91a3f4dc978 100644 (file)
@@ -1,4 +1,5 @@
 #include <msp/fs/stat.h>
+#include <msp/fs/utils.h>
 #include <msp/io/print.h>
 #include <msp/strings/regex.h>
 #include <msp/strings/utils.h>
@@ -18,7 +19,7 @@ GnuCxxCompiler::GnuCxxCompiler(Builder &b):
        aux_suffixes.push_back(".hpp");
 
        ExternalTask::Arguments argv;
-       argv.push_back(name);
+       argv.push_back(executable->get_path().str());
        argv.push_back("--version");
        builder.get_logger().log("auxcommands", format("Running %s", join(argv.begin(), argv.end())));
        ExternalTask task(argv);
@@ -36,7 +37,7 @@ GnuCxxCompiler::GnuCxxCompiler(Builder &b):
                                FS::Path cxx_path = FS::Path("/usr/include/c++")/cxx_ver;
                                if(FS::is_dir(cxx_path))
                                {
-                                       builder.get_logger().log("tools", format("%s version is %s", name, cxx_ver));
+                                       builder.get_logger().log("tools", format("%s version is %s", FS::basename(executable->get_path()), cxx_ver));
                                        system_path.push_back(cxx_path);
                                        break;
                                }