Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow repetition of simulation flags. (#7784)
- There are 4 policies for handling repeated flags. - `FLAG_REPEAT_POLICY_FORBID` - `FLAG_REPEAT_POLICY_IGNORE` - `FLAG_REPEAT_POLICY_REPLACE` - `FLAG_REPEAT_POLICY_COMBINE` The first three are implemented. Combining flags (`FLAG_REPEAT_POLICY_COMBINE)` is not yet implemented. Will be added later. _Maybe we need to add `FLAG_REPEAT_POLICY_IGNORE_SILENT` for flags like `-help`_. - If an `Option` (with value) is specified multiple times: Forbid: Prints an error and terminates flag/option processing. Ignore: Prints a warning and ignores the new value. Replace: Prints a warning and uses the new value. Combine: Prints a warning and combines all values (NOT YET IMPLEMENTED). - If a `flag` is specified multiple times: Forbid: Prints an error and terminates flag/option processing. Ignore: Prints a warning and ignores the repeated flags. Replace: Invalid for `flags`. Print error and terminate. Combine: Invalid for `flags`. Print error and terminate. - All flags/options are now set to `FLAG_REPEAT_POLICY_FORBID` except for `-help` and `-lv` which are both set to `FLAG_REPEAT_POLICY_REPLACE` for now. Please feel free to update the policies for the flags if you know what should be the best way to handle them each.
- Loading branch information
Showing
3 changed files
with
233 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters