]> git.tdb.fi Git - builder.git/blob - source/tool.cpp
Split Binary filename generation to Executable and SharedLibrary
[builder.git] / source / tool.cpp
1 #include <algorithm>
2 #include "tool.h"
3
4 using namespace std;
5
6 Tool::Tool(Builder &b, const string &t):
7         builder(b),
8         tag(t)
9 { }
10
11 bool Tool::accepts_suffix(const string &suffix) const
12 {
13         return find(input_suffixes.begin(), input_suffixes.end(), suffix)!=input_suffixes.end();
14 }
15
16 Target *Tool::create_target(Target &source, const string &arg) const
17 {
18         list<Target *> sources;
19         sources.push_back(&source);
20         return create_target(sources, arg);
21 }