[Scons-users] [c++] Automatically choosing sources for linking

Dirk Bächle tshortik at gmx.de
Fri Mar 28 19:09:57 EDT 2014


On 28.03.2014 20:51, Scott Davies wrote:

> Hi Dirk --

>

> I know that SCons can handle the header dependencies. I'm interested

> in also automatically determining what object files need to be linked

> into what executables (of which I have many with very different sets

> of dependencies, because of unit tests) in order to come up with a

> generic build system that will work on all my projects without my

> having it to tell it anything manually (other than external library

> dependencies) or mess around with internally created libraries (which

> fundamentally handicap build systems by making dependencies more

> coarse-grained).

>

Okay, since you wrote that you just started with SCons and are still in
the evaluation phase, I was unsure about how much you already know.

Thanks a lot for your clarifications, this use case scenario would
definitely be a good example of what SCons can do, that other build
systems can't. Now someone just has to implement it... ;)

For all my personal projects so far, I got away with a simple

env.Program('main', Glob('*.cpp'))

. The "Glob"bing also helps for building libraries, that's how I usually
avoid having to list each single source file.

Regards,

Dirk



More information about the Scons-users mailing list