Commit b6e6ec70 authored by kulvait's avatar kulvait

Threading parsing

parent 0d49a5bc
......@@ -13,7 +13,7 @@ public:
uint32_t threads = 0;
protected:
void addThreadingArgs();
void addThreadingArgs(CLI::Option_group* og=nullptr);
};
......
......@@ -3,15 +3,21 @@
using namespace CTL;
using namespace CTL::util;
void ArgumentsThreading::addThreadingArgs()
void ArgumentsThreading::addThreadingArgs(CLI::Option_group* og)
{
registerOption(
"threads",
cliApp
->add_option("-j,--threads", threads,
io::xprintf("Number of extra threads that the program can use, default is "
"%d. Zero extra threads means no threading.",
threads))
->check(CLI::Range(0, 65535)));
CLI::Option* threads_opt;
std::string spec = "-j,--threads";
std::string help =
io::xprintf("Number of extra threads that the program can use, default is "
"%d. Zero value denotes no threading.",
threads);
if(og == nullptr)
{
threads_opt = cliApp->add_option( spec, threads, help);
}else
{
threads_opt = og->add_option( spec, threads, help);
}
threads_opt->check(CLI::Range(0, 65535));
registerOption("threads", threads_opt);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment