[Scons-users] [c++] Automatically choosing sources for linking
Dirk Bächle
tshortik at gmx.de
Fri Mar 28 04:17:18 EDT 2014
Hi Scott,
On 28.03.2014 00:26, scottd wrote:
> Did this ever make it to the wiki? I was just looking at SCons (along with
> other build systems) and wondering if there was an easy way to do exactly
> this...very happy when I found an identical question answered just recently
> in the email archives.
>
> Having to manually list all the objects that have to go into each executable
> is pretty stupid when some huge fraction of C and C++ projects can have them
> computed from the automatically detected #includes with a tiny bit of "if
> foo.h is included, also include everything included by foo.c if it exists as
> a link-time dependency" hackery. If I can do this easily with SCons, then I
> am definitely switching to SCons.
please note that the normal detection of implicit dependencies, e.g.
Header files (*.h/*.hpp) for C++ projects, works "out-of-the-box" in SCons.
Viktor puts special requirements on his build process, that's why some
hacking is necessary. If you follow standard C/C++ project setups, there
shouldn't be anything in your way. Just try SCons out on a very simple
project, maybe you have a few files/folders that are currently
controlled by make/autotools.
If you get stuck while rewriting stuff, please ask your questions right
here and let us help you out.
Best regards,
Dirk
More information about the Scons-users
mailing list