I'm updating a small C program to take in a options from either
environment variables, or a config file and having long heard of boost
as a great resource decided to give the program_options module a try.
Since the utility is small and I don't have any current plans for
other boost functionality it doesn't make sense to include the full
BOOST library, so I tried to use bcp to get only the files I'm
interested in. I was able to get a subset of boost code that I should
be able to use with bcp, however I don't know how to compile the
program_options library for linking in my code.
>From a bit of googling it looks like bjam is the build tool, but it
doesn't seem to be included with the subset of files I have.
How would I go about incorporating boost so that all of the necessary
source and associated utilities are included for an end user to build
from. I should be able to issue a series of simple commands (looks
like ./bootstrap.sh and make) to build and install my library with
statically linked in boost.
-Will Voorhees
I believe that is a perfect (use) case for the current Ryppl's modularised Boost initiative.
By the way, I'd like to use a Boost component still in the sandbox, namely ECDF Accumulator:
https://svn.boost.org/svn/boost/sandbox/acc_ecdf/Unfortunately, on Windows, yes, it can be. There is an arbitrarily
low limit to the length of command lines that go through the CMD
processor.
Most Windows compilers therefore support "response files:" the ability
to write command-line parameters into a file and then instead specify
just that file on the command-line using "@<filename>.rsp". It
appears that CMake supports response files, but some compilers
tartgeting Windows (most notably those based on GCC) didn't, the last
time I checked.
You can of course invoke programs without going through CMD, but I
don't know whether any of the windows build drivers (make, nmake,
vcbuild, etc.) have that capability. I suppose one possibility would
be to create thin compiler wrappers as part of the build process and
then invoke those. These wrappers would process .rsp files and then
invoke the underlying tools directly (without going through the shell)
> Otherwise it maybe would be a good idea to get rid of the forwarding
> headers entirely. Then every module will use the include directories
> it really needs and won't be able to accidentally include headers of
> a library that is not listed as a dependency. This would also make
> the test results more meaningful.
That would be extremely valuable.
--
Dave Abrahams
BoostPro Computing
http://www.boostpro.com