Boost logo

Boost-Build :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2002-12-06 06:57:01

Vladimir Prus wrote:

> Markus Schöpflin wrote:
>>> I can't say, in general. From my point of view --- yes. I never
>>> understood why I should declare two target to achive the same
>>> goal -- building a library. Linux users are assustomed to easy
>>> switching static and dynamic linking. If you have "lib" and
>>> "dll", you'll either build them all (and that seems
>>> unnecessary), or you have introduce features that control if
>>> either one should be build --- i.e. you're back to "shared".
>> What about the problem that you usually have additional sources
>> for building a DLL on windows? The code for DllMain() for
>> example. Can I specify that somehow?
> Yes, that's possible, if we implement the "source" target as Rene
> suggested:
> source dll-files : dll_main.cpp : <toolset>msvc <shared>true ;
> source dll-file ;
-----------------^ s?

> lib a : a.cpp b.cpp dll-files ;
> You specify two alternatives for "dll-files" target. On msvc, when
> building shared, the first one will be selected, which will add
> "dll_main.cpp" to the list of sources. The second alternative is
> "catch(...)" -- it specifies that on other platforms, no dll
> specific files a needed.

This looks good, I think. We should consider an implicit addition of
the catch all declaration, as soon as any specialized version is
encountered. Or perhaps do it the same way as with C++ templates where
you have to declare it before you can specialize it. :-)

>> By the way, what is the current state of the discussion? I have
>> to admit I somehow lost track of it. I have to agree with you,
>> the time lag in mail delivery does make it difficult to follow.
>> Did you decide we need two features for the whole issue or a
>> single one?
> I'm beginning to loose it too. I'll try to summarize it a little
> bit later -- I'm now converting CVS repository to Subversion one
> (and trying to do something about 3 working copies, 300MB each).




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