[Insight-developers] Is there a way to shut up MetaCommand
warnings?
Julien Jomier
julien.jomier at kitware.com
Thu Aug 30 15:48:14 EDT 2007
Hi Kent,
There is a motivation for enforcing the short-option to be only one
character in order to allow multiple options using one dash (i.e ls -la).
I agree that it hasn't been enforced in the past but the plan is to mark
the feature as deprecated and enforce it in 2-3 releases.
I'm adding an option in metaCommand: DisableDeprecatedWarnings(); so you
can turn off the warning but you won't be able to use the multiple
options feature in the future.
Let me know if that works for you or not.
Sorry for the inconvenience,
Julien
kent williams wrote:
> So, we used MetaCommand for command line parsing, converting over almost all
> our locally developed programs. Since we were converting existing programs,
> we had to use the same command line arguments, so as not to break hundred of
> scripts.
>
> That worked great, except now, MetaCommand now wants to disallow short flags
> to one character, and force long flag names to have two dashes. So it
> prints out a warning to this effect every cotton-picking time we run our
> programs.
>
> Short of hacking the source, is there a way to turn off the warning message?
>
> I have to say that this is a new requirement/restriction that I don't find
> much justification for. It's nice that long-option syntax has been added
> (to make MetaCommand a little closer from outside appearance to GNU GetOpt),
> but REQUIRING two dashes for multi-character options seems a little harsh,
> especially since the code has been around for a long time without enforcing
> this restriction or printing warnings.
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
More information about the Insight-developers
mailing list