2020-04-30 23:37:33 -04:00
|
|
|
#include "pch.h"
|
|
|
|
|
#include "tasks.h"
|
|
|
|
|
|
2020-05-02 03:12:34 -04:00
|
|
|
namespace mob
|
2020-04-30 23:37:33 -04:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
spdlog::spdlog()
|
|
|
|
|
: basic_task("spdlog")
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 14:14:29 -04:00
|
|
|
std::string spdlog::version()
|
2020-05-07 11:08:33 -04:00
|
|
|
{
|
2020-05-17 15:50:15 -04:00
|
|
|
return conf::version_by_name("spdlog");
|
2020-05-07 11:08:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool spdlog::prebuilt()
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-30 23:37:33 -04:00
|
|
|
fs::path spdlog::source_path()
|
|
|
|
|
{
|
2020-05-07 11:08:33 -04:00
|
|
|
return paths::build() / ("spdlog-" + version());
|
2020-04-30 23:37:33 -04:00
|
|
|
}
|
|
|
|
|
|
2020-05-25 02:19:39 -04:00
|
|
|
void spdlog::do_clean(clean c)
|
|
|
|
|
{
|
|
|
|
|
instrument<times::clean>([&]
|
|
|
|
|
{
|
|
|
|
|
if (is_any_set(c, clean::redownload|clean::reextract))
|
|
|
|
|
{
|
|
|
|
|
git::delete_directory(cx(), source_path());
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-30 23:37:33 -04:00
|
|
|
void spdlog::do_fetch()
|
|
|
|
|
{
|
2020-05-21 04:45:49 -04:00
|
|
|
instrument<times::fetch>([&]
|
2020-05-20 05:41:19 -04:00
|
|
|
{
|
|
|
|
|
run_tool(task_conf().make_git()
|
2020-05-21 06:54:48 -04:00
|
|
|
.url(task_conf().make_git_url("gabime", "spdlog"))
|
2020-05-20 05:41:19 -04:00
|
|
|
.branch(version())
|
|
|
|
|
.root(source_path()));
|
|
|
|
|
});
|
2020-04-30 23:37:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace
|