Skip to content
Snippets Groups Projects
Commit f0875b61 authored by psychocrypt's avatar psychocrypt
Browse files

add cli option `-v/--version`

parent 062287ad
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@ The miner allow to overwrite some of the settings via command line options.
Usage: xmr-stak [OPTION]...
-h, --help show this help
-v, --version show version number
-c, --config FILE common miner configuration file
--currency NAME currency to mine: monero or aeon
--noCPU disable the CPU miner backend
......
......@@ -63,6 +63,7 @@ void help()
cout<<"Usage: "<<params::inst().binaryName<<" [OPTION]..."<<endl;
cout<<" "<<endl;
cout<<" -h, --help show this help"<<endl;
cout<<" -v, --version show version number"<<endl;
cout<<" -c, --config FILE common miner configuration file"<<endl;
#if (!defined(CONF_NO_AEON)) && (!defined(CONF_NO_MONERO))
cout<<" --currency NAME currency to mine: monero or aeon"<<endl;
......@@ -296,6 +297,11 @@ int main(int argc, char *argv[])
//win_exit();
return 0;
}
if(opName.compare("-v") == 0 || opName.compare("--version") == 0)
{
std::cout<< "Version: " << get_version_str() << std::endl;
return 0;
}
else if(opName.compare("--noCPU") == 0)
{
params::inst().useCPU = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment