Files
mob/src/tasks/spdlog.cpp
T
isanae ac3fa98e51 tasks will now delete their own git folders
git will check for uncommitted changes before deleting
added --ignore-uncommitted-changes
2020-05-25 02:19:39 -04:00

51 lines
721 B
C++

#include "pch.h"
#include "tasks.h"
namespace mob
{
spdlog::spdlog()
: basic_task("spdlog")
{
}
std::string spdlog::version()
{
return conf::version_by_name("spdlog");
}
bool spdlog::prebuilt()
{
return false;
}
fs::path spdlog::source_path()
{
return paths::build() / ("spdlog-" + version());
}
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;
}
});
}
void spdlog::do_fetch()
{
instrument<times::fetch>([&]
{
run_tool(task_conf().make_git()
.url(task_conf().make_git_url("gabime", "spdlog"))
.branch(version())
.root(source_path()));
});
}
} // namespace