Skip to content

Commit

Permalink
Process the new arguments early so that the old style ones can overri…
Browse files Browse the repository at this point in the history
…de behavior.
  • Loading branch information
grafikrobot committed Jun 1, 2024
1 parent 7cc92ba commit f84e34b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/engine/jam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ int guarded_main( int argc, char * * argv )
return EXITOK;
}

// Process options.
lyra::cli cli;
b2::command_db::declare_args(cli);
cli |= lyra::arg([](const std::string&){}, "").cardinality(0,0);
auto cli_parse_result = cli.parse({arg_c, arg_v});

/* Pick up interesting options. */
if ( ( s = getoptval( optv, 'n', 0 ) ) )
{
Expand Down Expand Up @@ -426,12 +432,6 @@ int guarded_main( int argc, char * * argv )
/* ++globs.noexec; */
}

//
lyra::cli cli;
b2::command_db::declare_args(cli);
cli |= lyra::arg([](const std::string&){}, "").cardinality(0,0);
auto cli_parse_result = cli.parse({arg_c, arg_v});

{
PROFILE_ENTER( MAIN );

Expand Down

0 comments on commit f84e34b

Please sign in to comment.