1 #include <msp/fs/stat.h>
2 #include "csourcefile.h"
3 #include "gnucxxcompiler.h"
8 GnuCxxCompiler::GnuCxxCompiler(Builder &b, const Architecture &a, const FS::Path &sysroot):
9 GnuCompiler(b, a, "CXX", sysroot)
11 set_command("g++", true);
12 input_suffixes.push_back(".cpp");
13 input_suffixes.push_back(".cc");
14 aux_suffixes.push_back(".hpp");
17 Target *GnuCxxCompiler::create_source(const Component &comp, const FS::Path &path) const
19 return new CSourceFile(builder, comp, path);
22 Target *GnuCxxCompiler::create_source(const FS::Path &path) const
24 return new CSourceFile(builder, path);
27 void GnuCxxCompiler::do_prepare()
29 GnuCompiler::do_prepare();
32 const FS::Path &sysroot = build_info.sysroot;
33 FS::Path cxx_path = sysroot/"usr"/"include"/"c++"/version;
34 if(FS::is_dir(cxx_path))
35 system_path.push_back(cxx_path);