summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-16 17:19:51 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-16 18:24:44 (GMT)
commitbeff29f0d4bf1ffface0e6833f29f2f04ceccf0b (patch)
treea5c2b35e96491f4073c2972090943e1623047381 /Source
parent12e4790a0b40d8176940f855f7f6c9cfe6c39f9f (diff)
downloadCMake-beff29f0d4bf1ffface0e6833f29f2f04ceccf0b.zip
CMake-beff29f0d4bf1ffface0e6833f29f2f04ceccf0b.tar.gz
CMake-beff29f0d4bf1ffface0e6833f29f2f04ceccf0b.tar.bz2
cmGeneratorTarget: Move ComputeVersionedName from cmTarget.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx21
-rw-r--r--Source/cmGeneratorTarget.h7
-rw-r--r--Source/cmTarget.cxx17
-rw-r--r--Source/cmTarget.h7
4 files changed, 26 insertions, 26 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 7e4c917..4d153b7 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3250,11 +3250,11 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name,
else
{
// The library's soname.
- this->Target->ComputeVersionedName(soName, prefix, base, suffix,
+ this->ComputeVersionedName(soName, prefix, base, suffix,
name, soversion);
// The library's real name on disk.
- this->Target->ComputeVersionedName(realName, prefix, base, suffix,
+ this->ComputeVersionedName(realName, prefix, base, suffix,
name, version);
}
@@ -4437,6 +4437,23 @@ void cmGeneratorTarget::GetTargetVersion(bool soversion,
}
//----------------------------------------------------------------------------
+void cmGeneratorTarget::ComputeVersionedName(std::string& vName,
+ std::string const& prefix,
+ std::string const& base,
+ std::string const& suffix,
+ std::string const& name,
+ const char* version) const
+{
+ vName = this->Makefile->IsOn("APPLE") ? (prefix+base) : name;
+ if(version)
+ {
+ vName += ".";
+ vName += version;
+ }
+ vName += this->Makefile->IsOn("APPLE") ? suffix : std::string();
+}
+
+//----------------------------------------------------------------------------
void
cmGeneratorTarget::ReportPropertyOrigin(const std::string &p,
const std::string &result,
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index f3b8d1f..f5a894b 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -483,6 +483,13 @@ private:
// Returns ARCHIVE, LIBRARY, or RUNTIME based on platform and type.
const char* GetOutputTargetType(bool implib) const;
+ void ComputeVersionedName(std::string& vName,
+ std::string const& prefix,
+ std::string const& base,
+ std::string const& suffix,
+ std::string const& name,
+ const char* version) const;
+
struct CompatibleInterfacesBase
{
std::set<std::string> PropsBool;
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 850fc6a..1c4faab 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2119,23 +2119,6 @@ cmTarget::ImportedGetFullPath(const std::string& config, bool pimplib) const
}
//----------------------------------------------------------------------------
-void cmTarget::ComputeVersionedName(std::string& vName,
- std::string const& prefix,
- std::string const& base,
- std::string const& suffix,
- std::string const& name,
- const char* version) const
-{
- vName = this->IsApple? (prefix+base) : name;
- if(version)
- {
- vName += ".";
- vName += version;
- }
- vName += this->IsApple? suffix : std::string();
-}
-
-//----------------------------------------------------------------------------
void cmTarget::SetPropertyDefault(const std::string& property,
const char* default_value)
{
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index a9d2454..443a2d0 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -414,13 +414,6 @@ private:
friend class cmGeneratorTarget;
friend class cmTargetTraceDependencies;
- void ComputeVersionedName(std::string& vName,
- std::string const& prefix,
- std::string const& base,
- std::string const& suffix,
- std::string const& name,
- const char* version) const;
-
cmListFileBacktrace Backtrace;
};