|
Boost-Build : |
Subject: Re: [Boost-build] bjam failing to detect some file dependencies
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2010-06-11 09:16:51
On 6/11/2010 2:17 AM, Engelbert Tijskens wrote:
> We are using boost-build now for more than a year to build our
> research codes for different platforms and compilers and we are
> generally satisfied with it. Sometimes boost-build fails to detect
> dependencies between files. We encountered two examples: 1. When we
> are using file iteration (BOOST_PP_FILENAME_x) in boost.preprocessor
> the dependency between the file describing the file iteration and the
> file using it is not detected and a change in the former does not
> result in recompilation. 2. when compiling our CUDA code something
> similar happens though it is not yet entirely clear what. Some of the
> .cuh files depend on .h files and the compiled code does not always
> reflect the changes made.
>
> Is there a way to explicitly add dependencies between files in a bjam
> project?
Preprocessor based includes does present a challenge to the regex based
parsing BBv2 does. The best/easiest solution I've found is to decorate
the code itself with "real" includes to the files that would normally be
PP included but do it as a comment (i.e. self documenting code). For
example:
// #include "pp.hpp"
#include SOME_DEFINE_PP
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org (msn) - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim,yahoo,skype,efnet,gmail
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk