summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-04-05 15:21:57 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-04-19 13:04:54 (GMT)
commit3fdae5acaaa7ef29e8776e4dccde6102016624f6 (patch)
treef47d16339bdf750c80eae9200d2ddf1a7ab84153 /Source/cmGeneratorTarget.cxx
parent38332fc4facce48d6eaefdf55886a3e1eb85e659 (diff)
downloadCMake-3fdae5acaaa7ef29e8776e4dccde6102016624f6.zip
CMake-3fdae5acaaa7ef29e8776e4dccde6102016624f6.tar.gz
CMake-3fdae5acaaa7ef29e8776e4dccde6102016624f6.tar.bz2
Genex: Add generator expressions $<DEVICE_LINK> and $<HOST_LINK>
These generator expressions can only be used in link options properties. These expressions return the arguments respectively for device and host link step, otherwise return an empty string.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx24
1 files changed, 14 insertions, 10 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index db25ddf..8a7f094 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -5532,6 +5532,13 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
return propContent;
}
+bool cmGeneratorTarget::SetDeviceLink(bool deviceLink)
+{
+ bool previous = this->DeviceLink;
+ this->DeviceLink = deviceLink;
+ return previous;
+}
+
bool cmGeneratorTarget::GetLinkInterfaceDependentBoolProperty(
const std::string& p, const std::string& config) const
{
@@ -5955,7 +5962,6 @@ const cmLinkInterfaceLibraries* cmGeneratorTarget::GetLinkInterfaceLibraries(
}
// Lookup any existing link interface for this configuration.
- std::string CONFIG = cmSystemTools::UpperCase(config);
cmHeadToLinkInterfaceMap& hm =
(usage_requirements_only
? this->GetHeadToLinkInterfaceUsageRequirementsMap(config)
@@ -6377,7 +6383,6 @@ const cmLinkInterface* cmGeneratorTarget::GetImportLinkInterface(
return nullptr;
}
- std::string CONFIG = cmSystemTools::UpperCase(config);
cmHeadToLinkInterfaceMap& hm =
(usage_requirements_only
? this->GetHeadToLinkInterfaceUsageRequirementsMap(config)
@@ -6591,16 +6596,15 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config,
cmHeadToLinkInterfaceMap& cmGeneratorTarget::GetHeadToLinkInterfaceMap(
const std::string& config) const
{
- std::string CONFIG = cmSystemTools::UpperCase(config);
- return this->LinkInterfaceMap[CONFIG];
+ return this->LinkInterfaceMap[cmSystemTools::UpperCase(config)];
}
cmHeadToLinkInterfaceMap&
cmGeneratorTarget::GetHeadToLinkInterfaceUsageRequirementsMap(
const std::string& config) const
{
- std::string CONFIG = cmSystemTools::UpperCase(config);
- return this->LinkInterfaceUsageRequirementsOnlyMap[CONFIG];
+ return this
+ ->LinkInterfaceUsageRequirementsOnlyMap[cmSystemTools::UpperCase(config)];
}
const cmLinkImplementation* cmGeneratorTarget::GetLinkImplementation(
@@ -6617,8 +6621,8 @@ const cmLinkImplementation* cmGeneratorTarget::GetLinkImplementation(
return nullptr;
}
- std::string CONFIG = cmSystemTools::UpperCase(config);
- cmOptionalLinkImplementation& impl = this->LinkImplMap[CONFIG][this];
+ cmOptionalLinkImplementation& impl =
+ this->LinkImplMap[cmSystemTools::UpperCase(config)][this];
if (secondPass) {
impl = cmOptionalLinkImplementation();
}
@@ -6877,8 +6881,8 @@ cmGeneratorTarget::GetLinkImplementationLibrariesInternal(
}
// Populate the link implementation libraries for this configuration.
- std::string CONFIG = cmSystemTools::UpperCase(config);
- HeadToLinkImplementationMap& hm = this->LinkImplMap[CONFIG];
+ HeadToLinkImplementationMap& hm =
+ this->LinkImplMap[cmSystemTools::UpperCase(config)];
// If the link implementation does not depend on the head target
// then return the one we computed first.