proxygen
NestedCommandLineAppTestHelper.cpp File Reference

Go to the source code of this file.

Functions

 DEFINE_int32 (global_foo, 42,"Global foo")
 
int main (int argc, char *argv[])
 

Function Documentation

DEFINE_int32 ( global_foo  ,
42  ,
"Global foo  
)
int main ( int  argc,
char *  argv[] 
)

Definition at line 45 of file NestedCommandLineAppTestHelper.cpp.

References folly::NestedCommandLineApp::addAlias(), folly::NestedCommandLineApp::addCommand(), folly::NestedCommandLineApp::addGFlags(), bm::init(), and folly::NestedCommandLineApp::run().

45  {
46  folly::NestedCommandLineApp app("", "0.1", "", "", init);
47  app.addGFlags();
48  // clang-format off
49  app.addCommand("foo", "[args...]", "Do some foo", "Does foo", foo)
50  .add_options()
51  ("local-foo", po::value<int32_t>()->default_value(42), "Local foo");
52  // clang-format on
53  app.addAlias("bar", "foo");
54  app.addAlias("baz", "bar");
55  return app.run(argc, argv);
56 }
void init()
char ** argv