aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-01-15 18:30:48 +0000
committerMike Buland <eichlan@xagasoft.com>2010-01-15 18:30:48 +0000
commit5c78c79b83283780d9494c8c127e3bc1aea83c73 (patch)
tree71c1794fbdcd80111c16f373009e8923a13a8903
parentcbd0823fde1b3feb4cfa9ef3a5affca5a4554d5e (diff)
downloadbuild-5c78c79b83283780d9494c8c127e3bc1aea83c73.tar.gz
build-5c78c79b83283780d9494c8c127e3bc1aea83c73.tar.bz2
build-5c78c79b83283780d9494c8c127e3bc1aea83c73.tar.xz
build-5c78c79b83283780d9494c8c127e3bc1aea83c73.zip
Used the new help features in Bu::OptParser.
-rw-r--r--src/main.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c0b8dd3..7637443 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -54,8 +54,9 @@ public:
54 "loaded build config, including available targets."); 54 "loaded build config, including available targets.");
55 addOption( slot( this, &Options::onListPlugins), "list-plugins", 55 addOption( slot( this, &Options::onListPlugins), "list-plugins",
56 "List all available plugins."); 56 "List all available plugins.");
57 addHelpOption();
57 58
58 addHelpBanner("The following options control general execution:"); 59 addHelpBanner("\nThe following options control general execution:");
59 addOption( sView, 'v', "view", sViews ); 60 addOption( sView, 'v', "view", sViews );
60 addOption( sConfig, 'f', "file", "Select a different config file." ); 61 addOption( sConfig, 'f', "file", "Select a different config file." );
61 addOption( bClean, 'c', "Shorthand for running action 'clean'. If an " 62 addOption( bClean, 'c', "Shorthand for running action 'clean'. If an "
@@ -75,6 +76,11 @@ public:
75 "You should probably never ever use this, it'll scare you." 76 "You should probably never ever use this, it'll scare you."
76 ); 77 );
77 78
79 setHelpDefault( "view", "=[view]" );
80 setHelpDefault( "file", "=[file]" );
81 setHelpDefault( "cache", "=[file]" );
82 setHelpDefault( "chdir", "=[dir]" );
83
78 setOverride( "no-env", "false" ); 84 setOverride( "no-env", "false" );
79 setOverride( "dot", "true" ); 85 setOverride( "dot", "true" );
80 setOverride( "debug", "true" ); 86 setOverride( "debug", "true" );
@@ -83,8 +89,6 @@ public:
83 setOverride( 'c', "true" ); 89 setOverride( 'c', "true" );
84 setOverride( "no-cache", "false" ); 90 setOverride( "no-cache", "false" );
85 91
86 addHelpOption();
87
88 setNonOption( slot( this, &Options::onNonOption ) ); 92 setNonOption( slot( this, &Options::onNonOption ) );
89 93
90 parse( argc, argv ); 94 parse( argc, argv );