[Scons-users] Refining PCH builder to handle variant_dirs correctly

Pedro Larroy pedro.larroy.lists at gmail.com
Fri Sep 7 05:51:59 EDT 2012


Hi

I'm trying to solve a complex problem with builders, I'm using PCH
with the following builder: https://gist.github.com/1321295

Basically when I build the precompiled header like this:
env.Gch(target='common/includes/all.h.gch', source=env['precompiled_header'])


In the pch_emitter I don't know how to get the source file to
calculate dependencies. Currently I'm hacking it in a dirty way by
passing it around in the environment, so I get it as:

h_path = env['precompiled_header'].abspath

inside pch_emitter.

Is there a better way to do this? I can't find one.

Regards.


More information about the Scons-users mailing list