cmExportFileGenerator: Make SetImportLinkProperty a template
Allow the vector of property entries to have any element type that can convert to std::string.
This commit is contained in:
parent
097be4139d
commit
edce43514d
|
@ -865,12 +865,13 @@ cmExportFileGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
template <typename T>
|
||||||
void
|
void
|
||||||
cmExportFileGenerator
|
cmExportFileGenerator
|
||||||
::SetImportLinkProperty(std::string const& suffix,
|
::SetImportLinkProperty(std::string const& suffix,
|
||||||
cmTarget* target,
|
cmTarget* target,
|
||||||
const std::string& propName,
|
const std::string& propName,
|
||||||
std::vector<std::string> const& entries,
|
std::vector<T> const& entries,
|
||||||
ImportPropertyMap& properties,
|
ImportPropertyMap& properties,
|
||||||
std::vector<std::string>& missingTargets
|
std::vector<std::string>& missingTargets
|
||||||
)
|
)
|
||||||
|
@ -884,7 +885,7 @@ cmExportFileGenerator
|
||||||
// Construct the property value.
|
// Construct the property value.
|
||||||
std::string link_entries;
|
std::string link_entries;
|
||||||
const char* sep = "";
|
const char* sep = "";
|
||||||
for(std::vector<std::string>::const_iterator li = entries.begin();
|
for(typename std::vector<T>::const_iterator li = entries.begin();
|
||||||
li != entries.end(); ++li)
|
li != entries.end(); ++li)
|
||||||
{
|
{
|
||||||
// Separate this from the previous entry.
|
// Separate this from the previous entry.
|
||||||
|
@ -902,7 +903,6 @@ cmExportFileGenerator
|
||||||
properties[prop] = link_entries;
|
properties[prop] = link_entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmExportFileGenerator::GenerateImportHeaderCode(std::ostream& os,
|
void cmExportFileGenerator::GenerateImportHeaderCode(std::ostream& os,
|
||||||
const std::string& config)
|
const std::string& config)
|
||||||
|
|
|
@ -95,9 +95,11 @@ protected:
|
||||||
std::string const& suffix, cmTarget* target,
|
std::string const& suffix, cmTarget* target,
|
||||||
ImportPropertyMap& properties,
|
ImportPropertyMap& properties,
|
||||||
std::vector<std::string>& missingTargets);
|
std::vector<std::string>& missingTargets);
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
void SetImportLinkProperty(std::string const& suffix,
|
void SetImportLinkProperty(std::string const& suffix,
|
||||||
cmTarget* target, const std::string& propName,
|
cmTarget* target, const std::string& propName,
|
||||||
std::vector<std::string> const& entries,
|
std::vector<T> const& entries,
|
||||||
ImportPropertyMap& properties,
|
ImportPropertyMap& properties,
|
||||||
std::vector<std::string>& missingTargets);
|
std::vector<std::string>& missingTargets);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue