Caching Implicit Dependencies

Scanning each file for #include lines does take some extra processing time. When you're doing a full build of a large system, the scanning time is usually a very small percentage of the overall time spent on the build. You're most likely to notice the scanning time, however, when you rebuild all or part of a large system: SCons will likely take some extra time to "think about" what must be built before it issues the first build command (or decides that everything is up to date and nothing must be rebuilt).

In practice, having SCons scan files saves time relative to the amount of potential time lost to tracking down subtle problems introduced by incorrect dependencies. Nevertheless, the "waiting time" while SCons scans files can annoy individual developers waiting for their builds to finish. Consequently, SCons lets you cache the implicit dependencies that its scanners find, for use by later builds. You do this either by specifying the --implicit-cache option on the command line:

       % scons --implicit-cache hello
       cc -c hello.c -o hello.o
       cc -o hello hello.o
       % scons hello
       scons: `hello' is up to date.
    

Or by setting the implicit_cache option in an SConscript file:

       SetOption('implicit_cache', 1)
    

SCons does not cache implicit dependencies like this by default because XXX

XXX

The --implicit-deps-changed Option

XXX

The --implicit-deps-unchanged Option

XXX