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

Scott Davies scottd at gmail.com
Mon Mar 31 18:52:38 EDT 2014



> includes = scanner(f, env, scanner.path_function(env))


Ah...yeah, that fixes it. Thanks! I'll start playing around with the
automatic link dependency stuff a bit more now that that glitch is out of
the way.


> However, an issue report would help here because the parsing shouldn't

crash...

Done.

-- Scott


On Sat, Mar 29, 2014 at 5:33 PM, Dirk Bächle <tshortik at gmx.de> wrote:


> On 29.03.2014 22:10, Scott Davies wrote:

>

>> I'm playing with the dependency calculation stuff in SCons using

>> http://www.scons.org/wiki/ExplicitlyCallCppScanner as a starting point,

>> and have immediately hit two problems.

>>

>> 1) I'm having trouble getting the scanner to pay any attention to

>> CPPPATH...as far as I can tell it's behaving as if the path is always set

>> to '.'.

>>

>> Simple example (note how c.h doesn't show up as a dependency despite

>> CPPPATH being set in the environment):

>>

>> [...]

>>

>>

>> Any idea what might be going on here? (I'm a newbie at both SCons and

>> Python, so I'm probably doing something stupid.)

>>

>> Looks like you need

>

> includes = scanner(f, env, scanner.path_function(env))

>

> instead of

>

> includes = scanner(f, env)

>

> . Looks a bit magic and I don't want to go into all the gory details about

> it right now. Instead I'll update the Wiki page accordingly, as soon as I

> find the time.

>

>

>

>>

>> 2) In another test on my actual codebase, if I use SCons.Scanner.C.

>> SConsCPPScannerWrapper('prescanner','.') rather than

>> SCons.Scanner.C.CScanner(), the scanner crashes (causing scons to

>> terminate) on one of my source files thusly:

>>

>>

> The current scanner doesn't support full expansion and tracking of macros,

> and probably never will. However, an issue report would help here because

> the parsing shouldn't crash...

>

>

> Dirk

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140331/889836a5/attachment.htm


More information about the Scons-users mailing list