Use Clara v0.0.1.1

This commit is contained in:
Phil Nash 2016-02-10 19:21:09 +00:00
parent ffad3a0a39
commit 880a2046d9
2 changed files with 188 additions and 20 deletions

View file

@ -131,7 +131,7 @@ namespace Catch {
Catch::cout() << "For more detail usage please see the project docs\n" << std::endl;
}
int applyCommandLine( int argc, char const* const argv[], OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) {
int applyCommandLine( int argc, char const* argv[], OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) {
try {
m_cli.setThrowOnUnrecognisedTokens( unusedOptionBehaviour == OnUnusedOptions::Fail );
m_unusedTokens = m_cli.parseInto( argc, argv, m_configData );
@ -158,13 +158,16 @@ namespace Catch {
m_config.reset();
}
int run( int argc, char const* const argv[] ) {
int run( int argc, char const* argv[] ) {
int returnCode = applyCommandLine( argc, argv );
if( returnCode == 0 )
returnCode = run();
return returnCode;
}
int run( int argc, char* argv[] ) {
return run( argc, const_cast<char const**>( argv ) );
}
int run() {
if( m_configData.showHelp )