[Scons-users] cache not working as expected for a recompile in another directory

Abt, Johannes johannes.abt at advantest.com
Thu Nov 19 04:11:37 EST 2015

On  Montag, 16. November 2015 20:46, Tom Tanner wrote:

> The directory name will be included in the command line, which is
> included as part of the calculation when determining if something needs
> to be built.

I checked that with a (trivial) "helloworld" example. I compile it in two different directories.

env = Environment()
env.Program(target = 'helloworld', source = ["helloworld.c"])

$ scons --quiet --cache-debug=-
CacheRetrieve(helloworld.o):  4055d8dd14fc46b0c3581d3de44bf7ba not in cache
CachePush(helloworld.o):  pushing to 4055d8dd14fc46b0c3581d3de44bf7ba
CacheRetrieve(helloworld):  9dde76adbcb82ed244ea692c8ab09d11 not in cache
CachePush(helloworld):  pushing to 9dde76adbcb82ed244ea692c8ab09d11
$ mkdir ../new-dir
$ cp SConstruct hello.h helloworld.c ../new-dir
$ cd ../new-dir/
$ scons --quiet --cache-debug=-
CacheRetrieve(helloworld.o):  retrieving from 4055d8dd14fc46b0c3581d3de44bf7ba
CacheRetrieve(helloworld):  retrieving from 9dde76adbcb82ed244ea692c8ab09d11

So, no, at least on this case, the directory name does not influence the build signature.


More information about the Scons-users mailing list