Re: [Cppunit-devel] config.h proposal
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2001-06-08 16:36:48
|
Quoting Bastiaan Bakker <bas...@li...>: > Hi, > > In order to cleanup the current config.h problems I like to propose > the > following approach, which is the one we also use in the log4cpp > project: > > * As usual we let autoconf & friends generate include/config.h.in and > include/config.h. Neither will be committed to CVS, include/config.h.in > will > end up in the dist tar. No CppUnit source file (i.e. *.cpp) shall > include > <config.h>. > * With the AC_CREATE_PREFIX_CONFIG_H macro (see > http://cryp.to/autoconf-archive/ <http://cryp.to/autoconf-archive/> ) we > let > autoconf generate include/cppunit/config.h from include/config.h. This > file > is identical to include/config.h, except that every #define will be > prefixed > with CPPUNIT_, ie 'HAVE_SSTREAM' will become' CPPUNIT_HAVE_SSTREAM'. > This file won't go into CVS or the dist tar either, but will be > installed > along with the other header files. > * For platforms that do not have autoconf a copy of > include/cppunit/config.h > will be made, for example to include/cppunit/config-msvc6.h. The > maintainer > each platform will have to manually edit this file to the correct > settings > for that platform. Each such file will go in CVS, dist and install. > * We create a new file include/cppunit/Portability.h, which, depending > on > the platform will include either include/cppunit/config.h or > include/cppunit/config-<platform>.h. This file will contain global > portability fixes for the supported platforms, e.g. > std::ostringstream, > '#pragma warning( disable : 4786 )', etc. It can also hold non > autoconf > switches like CPPUNIT_USE_TYPEINFO. All other CppUnit sources will > include > this file. The file itself will go in CVS, dist and install. > > Using this method we don't have to check in files like > include/config.h, > which may accidentally be overwritten by UNIX people. Also the Windows > folks > don't need to manually copy files in order to get started. > The only thing that does require attention is that people when people > add > autoconf tests and switches they update > include/cppunit/config-<platform>.h > too. > > If anyone has objections, please make them heard. If not, I'll try to > set > this up later coming weekend. If I understand thinks well, this seems excellent to me and solve all the issues. Go ahead. Thanks, Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Language: English, French |