|
Boost : |
From: Michael Roach (mcr_at_[hidden])
Date: 2001-06-01 09:44:10
----- Original Message -----
From: "John Maddock" <John_Maddock_at_[hidden]>
To: "boost" <boost_at_[hidden]>
Sent: Friday, 01 June, 2001 06:26
Subject: [boost] config.hpp - improving utility and ease of maintenance
>
> Vesa's config scheme is very timely: I've been contemplating integrating
> the regex config options with config.hpp - some have already been merged,
> but others haven't primarily to prevent config.hpp from becoming as
> cluttered as regex_config.hpp. However, I believe that with a few small
> tweaks we can make Vesa's scheme even better:
>
..snip...
>
> 2) We really need a method to regression test the boost configuration - in
> fact I think that this should come *before* changes to config.hpp are
> committed. What I would like to see are a set of separate test files, one
> for each feature, which will only compile if that feature is supported.
> The feature can then be tested in both a "positive" and a "negative"
sense:
>
May I suggest as a starting point the ISOcxx: The C++ Portability Package,
by Walter Brown. I'm no expert here but his work looks solid and complete.
Its documentation (with embedded links to the code) is available at:
http://www.fnal.gov/docs/working-groups/fpcltf/Pkg/ISOcxx/doc/0ISOcxx.html
> Positive test: should not compile if the macro needs to be defined and is
> not:
>
> #include <boost/config.hpp>
> #ifndef BOOST_MACRONAME
> // include test for BOOST_MACRONAME
> #include "macroname.cxx"
> #endif
>
> Negative test: Will compile only if the macro is defined when it need not
> be:
>
> #include <boost/config.hpp>
> #ifdef BOOST_MACRONAME
> // include test for BOOST_MACRONAME
> #include "macroname.cxx"
> #else
> #error this file should not compile
> #endif
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk