summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-17 13:08:13 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-18 14:29:30 (GMT)
commiteb3be7d68851ce87354f6bd90e0be3a670d22d56 (patch)
treedbee37acd61d0d9eabf4f391368abbcdc8995e9c /Source/cmGeneratorTarget.cxx
parentd231c31b98eb80929d9aabf8e606abde39fc08f4 (diff)
downloadCMake-eb3be7d68851ce87354f6bd90e0be3a670d22d56.zip
CMake-eb3be7d68851ce87354f6bd90e0be3a670d22d56.tar.gz
CMake-eb3be7d68851ce87354f6bd90e0be3a670d22d56.tar.bz2
cmGeneratorTarget: Move GetExportName from cmTarget.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 5e26aad..03c950e 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -335,6 +335,26 @@ std::string cmGeneratorTarget::GetName() const
}
//----------------------------------------------------------------------------
+std::string cmGeneratorTarget::GetExportName() const
+{
+ const char *exportName = this->GetProperty("EXPORT_NAME");
+
+ if (exportName && *exportName)
+ {
+ if (!cmGeneratorExpression::IsValidTargetName(exportName))
+ {
+ std::ostringstream e;
+ e << "EXPORT_NAME property \"" << exportName << "\" for \""
+ << this->GetName() << "\": is not valid.";
+ cmSystemTools::Error(e.str().c_str());
+ return "";
+ }
+ return exportName;
+ }
+ return this->GetName();
+}
+
+//----------------------------------------------------------------------------
const char *cmGeneratorTarget::GetProperty(const std::string& prop) const
{
return this->Target->GetProperty(prop);