Commit 3e7bc358 authored by Grumbel's avatar Grumbel

Added --version option

parent d7914dd4
Pipeline #25428260 passed with stage
in 4 minutes and 10 seconds
......@@ -27,7 +27,8 @@ void print_help()
<< "\n"
<< " DEVICE event device file to start with\n"
<< "\n"
<< " -h, --help Print help\n";
<< " -v, --version Print version number\n"
<< " -h, --help Print help\n";
}
int main(int argc, char** argv)
......@@ -48,6 +49,12 @@ int main(int argc, char** argv)
print_help();
return 0;
}
else if (strcmp(argv[i], "-v") == 0 ||
strcmp(argv[i], "--version") == 0)
{
std::cout << "evtest-qt " << EVTEST_QT_VERSION << std::endl;
return 0;
}
else
{
if (!args.empty())
......
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