Boost logo

Boost :

Subject: Re: [boost] boost:: program_options
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2010-05-22 02:49:45


Vijay Samuel wrote:

> Hi,
> I have a query regarding boost:: program_options. Is it possible for
> multiple programs to use a single configuration file? If so, then how?

I guess the straightforward solution is to declare the options twice -- once
per each program? If that's not good, you can create a library, used by
both program, which registers the options.

> I
> have two programs which have to use a single configuration file. Both
> programs have both similar and unique options but have different default
> values.

I imagine that using a helper library, you should be able to adjust default
values depending on which program asks for the options to be registered.

- Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk