Boost logo

Boost :

Subject: Re: [boost] Automating the header compilation check. was : [thread]1.36 thread.hpp compilation problem
From: John Maddock (john_at_[hidden])
Date: 2008-09-05 05:10:23


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 :-(

John.


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