From: Mikko Rasa Date: Fri, 8 Jun 2012 22:55:37 +0000 (+0300) Subject: Allow sources to be created without a component X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e09cea0ffcef4ab5ea35c47c5b34237c44d0741f;p=builder.git Allow sources to be created without a component --- diff --git a/source/gnuccompiler.cpp b/source/gnuccompiler.cpp index 5c21413..f0d356c 100644 --- a/source/gnuccompiler.cpp +++ b/source/gnuccompiler.cpp @@ -15,3 +15,8 @@ Target *GnuCCompiler::create_source(const Component &comp, const FS::Path &path) { return new CSourceFile(builder, comp, path); } + +Target *GnuCCompiler::create_source(const FS::Path &path) const +{ + return new CSourceFile(builder, path); +} diff --git a/source/gnuccompiler.h b/source/gnuccompiler.h index 2ebfc43..a95f22d 100644 --- a/source/gnuccompiler.h +++ b/source/gnuccompiler.h @@ -9,6 +9,7 @@ public: GnuCCompiler(Builder &); virtual Target *create_source(const Component &, const Msp::FS::Path &) const; + virtual Target *create_source(const Msp::FS::Path &) const; }; #endif diff --git a/source/gnucxxcompiler.cpp b/source/gnucxxcompiler.cpp index 0601fc2..0923581 100644 --- a/source/gnucxxcompiler.cpp +++ b/source/gnucxxcompiler.cpp @@ -52,3 +52,8 @@ Target *GnuCxxCompiler::create_source(const Component &comp, const FS::Path &pat { return new CSourceFile(builder, comp, path); } + +Target *GnuCxxCompiler::create_source(const FS::Path &path) const +{ + return new CSourceFile(builder, path); +} diff --git a/source/gnucxxcompiler.h b/source/gnucxxcompiler.h index 760994f..53d2d2a 100644 --- a/source/gnucxxcompiler.h +++ b/source/gnucxxcompiler.h @@ -9,6 +9,7 @@ public: GnuCxxCompiler(Builder &); virtual Target *create_source(const Component &, const Msp::FS::Path &) const; + virtual Target *create_source(const Msp::FS::Path &) const; }; #endif diff --git a/source/tool.h b/source/tool.h index 1905555..c302f3c 100644 --- a/source/tool.h +++ b/source/tool.h @@ -34,6 +34,7 @@ public: const SearchPath &get_system_path() const { return system_path; } virtual Target *create_source(const Component &, const Msp::FS::Path &) const { return 0; } + virtual Target *create_source(const Msp::FS::Path &) const { return 0; } Target *create_target(Target &, const std::string & = std::string()) const; virtual Target *create_target(const std::list &, const std::string & = std::string()) const = 0; virtual Task *run(const Target &) const = 0;