Boost logo

Boost-Build :

From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2006-10-17 14:28:41

> Emil Dotchevski wrote:
>> Hello,
>> <snipped>
>> The end result I need is this: when a header file of the said library is
>> included in a cpp from another location, the library header file gets the
>> name of the including cpp.
>> <snipped>
> I'm assuming that you want the define to change for each file compiled
> in the library target?

I am a bit confused by this reply.

The library itself, or its source files, do not need any defines. What I
need is the library's usage requirements to cause a <define> to appear in
all client targets, such that each cpp file in a client target gets a
"-D__BASE_FILE__=<n>" passed to the compiler, where <n> is the (complete)
name of the cpp file (from the client target, not the library) being

Clearly, boost-build has the cpp file when it launches the compiler, so it
seems to me that at least there should be a way to modify the msvc support
in boost-build to always pass a -D on the command line to specify the cpp
file being compiled. Even if the solution is hard-coded in the msvc support,
it would be of great help to me.

Thanks a lot for your time,

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at