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

Function ParseAndCheckCommandLine

test/test.cc:170–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168 }
169
170 bool ParseAndCheckCommandLine(int argc, char* argv[]) {
171 gflags::ParseCommandLineNonHelpFlags(&argc, &argv, true);
172 if (FLAGS_h) {
173 ShowUsage();
174 return false;
175 }
176
177 if (FLAGS_ic < 1) {
178 printf("Parameter -ic should be greater than zero (default 1) \n");
179 ShowUsage();
180 return false;
181 }
182
183 if (FLAGS_mp.empty()) {
184 printf("Parameter -mp is not set \n");
185 ShowUsage();
186 return false;
187 }
188
189 return true;
190 }
191
192 void ShowUsage() {
193 printf(" -h \t%s \n", help_message);

Callers 1

RunFunction · 0.70

Calls 2

ShowUsageFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected