X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftool.cpp;h=8aa75dcafd982646980871b59ff74c796d5a00ca;hb=43d1143e6dc6bbf3797dbaae42d4bfce3dea5d88;hp=a23de6322e8ad3fef1422531d8577944b18000de;hpb=9e28243c9687608ec3c32954b4031490296ae877;p=builder.git diff --git a/source/tool.cpp b/source/tool.cpp index a23de63..8aa75dc 100644 --- a/source/tool.cpp +++ b/source/tool.cpp @@ -1,7 +1,11 @@ #include +#include +#include "architecture.h" +#include "builder.h" #include "tool.h" using namespace std; +using namespace Msp; Tool::Tool(Builder &b, const string &t): builder(b), @@ -45,6 +49,16 @@ void Tool::prepare() do_prepare(); } +void Tool::set_executable(const string &command, bool cross) +{ + if(cross && architecture->is_cross()) + return set_executable(format("%s-%s", architecture->get_cross_prefix(), command), false); + + executable = builder.get_vfs().find_binary(command); + if(!executable) + problems.push_back(format("Can't find executable %s", command)); +} + SubTool::SubTool(Tool &p): Tool(p),