add new version of CommandLineParser. add empty docs
This commit is contained in:
@@ -3,19 +3,23 @@
|
||||
|
||||
const char* keys =
|
||||
{
|
||||
"{ b |build |false | print complete build info }"
|
||||
"{ h |help |false | print this help }"
|
||||
"{ b build | | print complete build info }"
|
||||
"{ h help | | print this help }"
|
||||
};
|
||||
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
cv::CommandLineParser parser(argc, argv, keys);
|
||||
|
||||
if (parser.get<bool>("help"))
|
||||
if (parser.has("help"))
|
||||
{
|
||||
parser.printParams();
|
||||
parser.printMessage();
|
||||
}
|
||||
else if (parser.get<bool>("build"))
|
||||
else if (!parser.check())
|
||||
{
|
||||
parser.printErrors();
|
||||
}
|
||||
else if (parser.has("build"))
|
||||
{
|
||||
std::cout << cv::getBuildInformation() << std::endl;
|
||||
}
|
||||
@@ -25,4 +29,4 @@ int main(int argc, const char* argv[])
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user