Boost logo

Boost :

Subject: Re: [boost] Automating the header compilation check. was :[thread]1.36 thread.hpp compilation problem
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-09-05 13:53:39


----- Original Message -----
From: "John Maddock" <john_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, September 05, 2008 11:10 AM
Subject: Re: [boost] Automating the header compilation check. was
:[thread]1.36 thread.hpp compilation problem

>
> vicente.botet wrote:
>>> in my developement I use to include some tests that check that a
>>> header file compiles. Other boost developers do the same. How this
>>> is done now?
>>>
>>> We write a .cpp file including the header file
>>>
>>> // check_header1_compiles.cpp
>>> #include <boost/header1.hpp>
>>>
>>> and add it to the list of compile test
>>>
>>> test-suite LIB_inclusion :
>>> [ compile check_header1_compiles.cpp : : ]
>>> [ compile check_header2_compiles.cpp : : ]
>>> ...
>>> [ compile check_headerN_compiles.cpp : : ]
>>>
>>> Even if this is simple, the creation of the file is tedious. Do you
>>> know a simple way to do it?
>
> No, I've done this by hand in the past, and it's *very* tedious.
>
> BTW, it's not sufficient to simply include the header: if the header
> contains templates, then you also need to instantiate those templates to
> ensure everything they use is visible to them. Not sure how one would
> automate that :-(

Right, it is not enough, but it is already useful.

When the developper wants to check the template instantiation with
archetypes he/she will do it explicitly, so there is no problem.

Vicente


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