On Sep 23, 2011, at 10:07 AM, Waclaw Kusnierczyk wrote:
> it's not unusual to use double-hyphen ('--') to separate options
> intended for the wrapper from the options intended for the wrapped. so
> you could have
>
> wrapper --foo -- --foo
>
> with the first --foo interpreted by the wrapper and the other one passed
> down to whatever the downstream program is.
Yes, we considered this approach.
However, we ultimately discarded it when someone showed a real-world code that
used *multiple* wrapper compilers (i.e., one wrapper compiler invoked another,
which, in turn, invoked another, and then finally invoked the real/underlying
compiler). Who gets the tokens before "--"?
You could certainly have a command line like:
wrapper1 --foo -- --opions-for-wrapper2 -- --options-for-wrapper3 -- foo.c
-o foo
But that seems exceedingly distasteful.
I'm afraid I don't remember the specific application / middleware that was used
in our decision point not to support "--", but I should point out it was very
much in line with our original philosophy: only understand --showme and pass
everything else, including "--", to the underlying executable (which may just
happen to be another wrapper or something else that might understand "--").
Given that MPI can be used with other middleware, we decided that the best
approach was minimalistic and allow our flags to be extracted if needed. Those
two options seemed to cover all cases, even if they -- unfortunately -- aren't
portable.
--
Jeff Squyres
[email protected]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/