diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-05 17:19:50 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-10 09:03:48 (GMT) |
commit | 3e428fdcb4640411f8cbc4adc42c30b9c8b8032e (patch) | |
tree | 17340538688948d3a8057daaac73672f761296d3 /Source | |
parent | 110fd2fba1cbd6c3d89f5460d3f58a94d52d4546 (diff) | |
download | CMake-3e428fdcb4640411f8cbc4adc42c30b9c8b8032e.zip CMake-3e428fdcb4640411f8cbc4adc42c30b9c8b8032e.tar.gz CMake-3e428fdcb4640411f8cbc4adc42c30b9c8b8032e.tar.bz2 |
cmGeneratorTarget: Move IsImportedSharedLibWithoutSOName from cmTarget.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 3 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 13 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.h | 4 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 14 | ||||
-rw-r--r-- | Source/cmTarget.h | 4 |
5 files changed, 19 insertions, 19 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index b8e2284..9371546 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -1101,9 +1101,10 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item, this->SharedLibrariesLinked.insert(target); } + cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(target); // Handle case of an imported shared library with no soname. if(this->NoSONameUsesPath && - target->IsImportedSharedLibWithoutSOName(this->Config)) + gtgt->IsImportedSharedLibWithoutSOName(this->Config)) { this->AddSharedLibNoSOName(item); return; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8663593..8ff78e0 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1338,6 +1338,19 @@ bool cmGeneratorTarget::IsChrpathUsed(const std::string& config) const return false; } +//---------------------------------------------------------------------------- +bool cmGeneratorTarget::IsImportedSharedLibWithoutSOName( + const std::string& config) const +{ + if(this->IsImported() && this->GetType() == cmTarget::SHARED_LIBRARY) + { + if(cmTarget::ImportInfo const* info = this->Target->GetImportInfo(config)) + { + return info->NoSOName; + } + } + return false; +} //---------------------------------------------------------------------------- bool cmGeneratorTarget::HasMacOSXRpathInstallNameDir( diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 0e41661..49de632 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -415,6 +415,10 @@ public: /** Whether this library defaults to \@rpath. */ bool MacOSXRpathInstallNameDirDefault() const; + /** Test for special case of a third-party shared library that has + no soname at all. */ + bool IsImportedSharedLibWithoutSOName(const std::string& config) const; + private: friend class cmTargetTraceDependencies; struct SourceEntry { std::vector<cmSourceFile*> Depends; }; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 88bda67..3de7efe 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2178,20 +2178,6 @@ const char* cmTarget::GetPrefixVariableInternal(bool implib) const } //---------------------------------------------------------------------------- -bool cmTarget::IsImportedSharedLibWithoutSOName( - const std::string& config) const -{ - if(this->IsImported() && this->GetType() == cmTarget::SHARED_LIBRARY) - { - if(cmTarget::ImportInfo const* info = this->GetImportInfo(config)) - { - return info->NoSOName; - } - } - return false; -} - -//---------------------------------------------------------------------------- std::string cmTarget::GetFullNameImported(const std::string& config, bool implib) const { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 6ba9772..16d0121 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -244,10 +244,6 @@ public: void GetTargetVersion(bool soversion, int& major, int& minor, int& patch) const; - /** Test for special case of a third-party shared library that has - no soname at all. */ - bool IsImportedSharedLibWithoutSOName(const std::string& config) const; - /** Does this target have a GNU implib to convert to MS format? */ bool HasImplibGNUtoMS() const; |