diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2019-12-13 21:55:00 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-02-26 15:38:42 (GMT) |
commit | 461efa7b51f5d63ab5e366af3a615a469ac0e65f (patch) | |
tree | d703f0e23d718fe225b70fffd09e028576c4d4e9 /Source/cmGeneratorTarget.h | |
parent | 54d1268ed466c68845e01d28fc17f162f384ac39 (diff) | |
download | CMake-461efa7b51f5d63ab5e366af3a615a469ac0e65f.zip CMake-461efa7b51f5d63ab5e366af3a615a469ac0e65f.tar.gz CMake-461efa7b51f5d63ab5e366af3a615a469ac0e65f.tar.bz2 |
Genex: Add $<LINK_LANGUAGE:...> and $<LINK_LANG_AND_ID:...>
This MR may help to solve issues #19757 and #18008
Fixes: #19965
Diffstat (limited to 'Source/cmGeneratorTarget.h')
-rw-r--r-- | Source/cmGeneratorTarget.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index d81bb3d..9f90cec 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -357,7 +357,6 @@ public: }; LinkClosure const* GetLinkClosure(const std::string& config) const; - void ComputeLinkClosure(const std::string& config, LinkClosure& lc) const; cmLinkImplementation const* GetLinkImplementation( const std::string& config) const; @@ -816,6 +815,7 @@ private: std::string& outPrefix, std::string& outBase, std::string& outSuffix) const; + mutable std::string LinkerLanguage; using LinkClosureMapType = std::map<std::string, LinkClosure>; mutable LinkClosureMapType LinkClosureMap; @@ -850,6 +850,10 @@ private: void CheckPropertyCompatibility(cmComputeLinkInformation& info, const std::string& config) const; + void ComputeLinkClosure(const std::string& config, LinkClosure& lc) const; + bool ComputeLinkClosure(const std::string& config, LinkClosure& lc, + bool secondPass) const; + struct LinkImplClosure : public std::vector<cmGeneratorTarget const*> { bool Done = false; @@ -868,6 +872,17 @@ private: std::string GetLinkInterfaceDependentStringAsBoolProperty( const std::string& p, const std::string& config) const; + friend class cmTargetCollectLinkLanguages; + cmLinkInterface const* GetLinkInterface(const std::string& config, + const cmGeneratorTarget* headTarget, + bool secondPass) const; + void ComputeLinkInterface(const std::string& config, + cmOptionalLinkInterface& iface, + const cmGeneratorTarget* head, + bool secondPass) const; + cmLinkImplementation const* GetLinkImplementation(const std::string& config, + bool secondPass) const; + // Cache import information from properties for each configuration. struct ImportInfo { @@ -894,9 +909,10 @@ private: the link dependencies of this target. */ std::string CheckCMP0004(std::string const& item) const; - cmLinkInterface const* GetImportLinkInterface( - const std::string& config, const cmGeneratorTarget* head, - bool usage_requirements_only) const; + cmLinkInterface const* GetImportLinkInterface(const std::string& config, + const cmGeneratorTarget* head, + bool usage_requirements_only, + bool secondPass = false) const; using KindedSourcesMapType = std::map<std::string, KindedSources>; mutable KindedSourcesMapType KindedSourcesMap; @@ -940,7 +956,8 @@ private: const cmGeneratorTarget* headTarget, bool usage_requirements_only, std::vector<cmLinkItem>& items, - bool& hadHeadSensitiveCondition) const; + bool& hadHeadSensitiveCondition, + bool& hadLinkLanguageSensitiveCondition) const; void LookupLinkItems(std::vector<std::string> const& names, cmListFileBacktrace const& bt, std::vector<cmLinkItem>& items) const; |