• Stephen Kelly's avatar
    cmTarget: Short-circuit language computation if context independent. · b1c3ae33
    Stephen Kelly authored
    Computing the language involves computing the source files, which
    is an expensive operation.  It requires calling
    cmMakefile::GetOrCreateSource many times, which involves creating
    and matching on many cmSourceFileLocation objects.
    
    Source files of a target may depend on the head-target and the
    config as of commit e6971df6 (cmTarget: Make the source files depend
    on the config., 2014-02-13).  The results are cached for each context
    as of commit c5b26f3b (cmTarget: Cache the cmSourceFiles in
    GetSourceFiles., 2014-04-05).
    
    Each target in the build graph causes language computation of all
    of its dependents with itself as the head-target.  This means that
    for 'core' libraries on which everything depends, the source files
    are computed once for every transitive target-level-dependee and
    the result is not cached because the head-target is different. This
    was observed in the VTK buildsystem.
    
    Short circuit the computation for targets which have a source-list
    that is independent of the head-target.  If the source-list has
    already been computed and the generator expression evaluation
    reports that it was context-independent, return the only source-list
    already cached for the target.  Reset the short-circuit logic when
    sources are added and when the link libraries are re-computed.
    b1c3ae33
Name
Last commit
Last update
Auxiliary Loading commit data...
Help Loading commit data...
Licenses Loading commit data...
Modules Loading commit data...
Source Loading commit data...
Templates Loading commit data...
Tests Loading commit data...
Utilities Loading commit data...
.gitattributes Loading commit data...
.hooks-config.bash Loading commit data...
CMakeCPack.cmake Loading commit data...
CMakeCPackOptions.cmake.in Loading commit data...
CMakeGraphVizOptions.cmake Loading commit data...
CMakeLists.txt Loading commit data...
CMakeLogo.gif Loading commit data...
CONTRIBUTING.rst Loading commit data...
CTestConfig.cmake Loading commit data...
CTestCustom.cmake.in Loading commit data...
CompileFlags.cmake Loading commit data...
Copyright.txt Loading commit data...
DartConfig.cmake Loading commit data...
DartLocal.conf.in Loading commit data...
README.rst Loading commit data...
bootstrap Loading commit data...
cmake_uninstall.cmake.in Loading commit data...
configure Loading commit data...
doxygen.config Loading commit data...