MCPcopy Create free account
hub / github.com/Tencent/TNN / ParseAndCheckCommandLine

Function ParseAndCheckCommandLine

examples/linux/src/flags.cc:32–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32bool ParseAndCheckCommandLine(int argc, char* argv[], bool input_required) {
33 gflags::ParseCommandLineNonHelpFlags(&argc, &argv, true);
34 if (FLAGS_h) {
35 return false;
36 }
37
38 if (FLAGS_m.empty() || FLAGS_p.empty()) {
39 printf("Parameter -m and -p should be set \n");
40 return false;
41 }
42
43 if (FLAGS_i.empty() && input_required) {
44 printf("Parameter -i should be set \n");
45
46 return false;
47 }
48
49 return true;
50}

Callers 4

mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected