[Scons-users] absolute/relative paths in CPPPATH

Dan Pidcock dan.pidcock at googlemail.com
Fri Mar 8 03:13:54 EST 2013


Have you tried CPPPATH=Dir('.') or CPPPATH=Dir('.').Abspath ?
On 8 Mar 2013 08:05, "ml" <ml at dasir.net> wrote:

Hi!

I have a SConstruct file e.g.:

/maindir/dir1/SConstruct

where I have env.Append(CPPPATH="/maindir/**dir1") and it builds a program1
... note the absolute path. When I run scons in that directory then the
absolute path is converted to a relative one and it executes the compiler
with "-I.". That is OK so far. Then I have a second SConstruct e.g.:

/maindir/dir2/SConstruct

which imports the first one and uses some of its objects and builds
program2. The problem is that the CPPPATH in the first SConstruct is left
as absolute path and it does not use the build cache because the compile
command is different so it compiles the same targets (object files) again
despite that it was already built with /maindir/dir1/SConstruct.

Is there any option to force CPPPATH to use always absolute path? I found
SCons.Node.FS.RootDir which might behave this way but it is unreachable as
e.g. env.Append(CPPPATH=RootDir("/**maindir/dir1")).

Thanks
David
______________________________**_________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/**mailman/listinfo/scons-users<http://four.pairlist.net/mailman/listinfo/scons-users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130308/16922bb3/attachment.htm>


More information about the Scons-users mailing list