diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2017-04-17 20:24:44 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2017-04-21 12:57:40 (GMT) |
commit | adf60b28384025d5b83c2df5a66f2190753e2695 (patch) | |
tree | c07e71eca348da7d33108042e6a897efba77166b /Source/cmNinjaTargetGenerator.h | |
parent | 01c5bb9551ff0322f2cb4d5439a2ab9a94c87815 (diff) | |
download | CMake-adf60b28384025d5b83c2df5a66f2190753e2695.zip CMake-adf60b28384025d5b83c2df5a66f2190753e2695.tar.gz CMake-adf60b28384025d5b83c2df5a66f2190753e2695.tar.bz2 |
ninja: break unnecessary target dependencies
Previously, given two libraries, X and Y where X depends on Y, all
object compilations of X would require the Y library to have been linked
before being compiled. This is not necessary and can instead be loosened
such that object compilations of X only depend on the order-only
dependencies of Y to be completed. This is to ensure that generated
sources, headers, custom commands, etc. are completed before X starts to
compile its objects.
This should help build performance in projects with many libraries which
cause a deep library dependency chain. Previously, a library at the
bottom would not start compilation until after all other libraries
completed, but now only its link step needs to wait and its compilation
jobs can be run in parallel with other tasks.
Fixes: #15555
Diffstat (limited to 'Source/cmNinjaTargetGenerator.h')
-rw-r--r-- | Source/cmNinjaTargetGenerator.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h index 9ce8651..5eb7a9a 100644 --- a/Source/cmNinjaTargetGenerator.h +++ b/Source/cmNinjaTargetGenerator.h @@ -119,8 +119,7 @@ protected: void WriteLanguageRules(const std::string& language); void WriteCompileRule(const std::string& language); void WriteObjectBuildStatements(); - void WriteObjectBuildStatement(cmSourceFile const* source, - bool writeOrderDependsTargetForTarget); + void WriteObjectBuildStatement(cmSourceFile const* source); void WriteTargetDependInfo(std::string const& lang); void ExportObjectCompileCommand( |