Genex: Add $<LINK_LANGUAGE:...> and $<LINK_LANG_AND_ID:...>

This MR may help to solve issues #19757 and #18008

Fixes: #19965
This commit is contained in:
Marc Chevrier
2019-12-13 22:55:00 +01:00
parent 54d1268ed4
commit 461efa7b51
182 changed files with 1619 additions and 55 deletions

View File

@@ -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;