mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
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.
This commit is contained in:
@@ -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 \
|
||||
{ \
|
||||
|
||||
Reference in New Issue
Block a user