[Scons-users] absolute/relative paths in CPPPATH
ml
ml at dasir.net
Fri Mar 8 03:05:16 EST 2013
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
More information about the Scons-users
mailing list