diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-07-29 18:19:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-08-12 15:31:07 (GMT) |
commit | 2e42651dff43c4e962f03fc24281cbf446880ded (patch) | |
tree | 5a1fa6f2098d9cb5bdc04c7f9285dc454c3a5ebf /Source/cmGeneratorTarget.h | |
parent | 0cd3b5d0ca8d541fc3769f467db71a07a95be7f6 (diff) | |
download | CMake-2e42651dff43c4e962f03fc24281cbf446880ded.zip CMake-2e42651dff43c4e962f03fc24281cbf446880ded.tar.gz CMake-2e42651dff43c4e962f03fc24281cbf446880ded.tar.bz2 |
Add option to optimize link dependencies for static libraries
Add an `OPTIMIZE_DEPENDENCIES` target property and supporting
`CMAKE_OPTIMIZE_DEPENDENCIES` variable to optionally enable pruning and
flattening of outgoing dependencies from static libraries. Since they
do not actually link, they only depend on side effects of their
dependencies. Therefore we can drop dependencies that contribute no
side effects.
Diffstat (limited to 'Source/cmGeneratorTarget.h')
-rw-r--r-- | Source/cmGeneratorTarget.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 4a03f65..69c5faf 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -55,6 +55,12 @@ public: std::vector<cmCustomCommand> const& GetPreLinkCommands() const; std::vector<cmCustomCommand> const& GetPostBuildCommands() const; + void AppendCustomCommandSideEffects( + std::set<cmGeneratorTarget const*>& sideEffects) const; + void AppendLanguageSideEffects( + std::map<std::string, std::set<cmGeneratorTarget const*>>& sideEffects) + const; + #define DECLARE_TARGET_POLICY(POLICY) \ cmPolicies::PolicyStatus GetPolicyStatus##POLICY() const \ { \ |