diff options
author | Brad King <brad.king@kitware.com> | 2014-06-12 20:20:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-06-23 13:14:45 (GMT) |
commit | bcdb7ff9df8fb831e952a3909da11da51773a30f (patch) | |
tree | e49026e86507dc9407fa584f0f1e4ca844b87003 | |
parent | bd9b667bbe83b112a9ea4448605fac980d2d8a68 (diff) | |
download | CMake-bcdb7ff9df8fb831e952a3909da11da51773a30f.zip CMake-bcdb7ff9df8fb831e952a3909da11da51773a30f.tar.gz CMake-bcdb7ff9df8fb831e952a3909da11da51773a30f.tar.bz2 |
cmTarget: Remove 'head' argument from GetLinkerLanguage
It is only ever called with the 'this' target as the head.
Co-Author: Stephen Kelly <steveire@gmail.com>
-rw-r--r-- | Source/cmTarget.cxx | 15 | ||||
-rw-r--r-- | Source/cmTarget.h | 3 |
2 files changed, 7 insertions, 11 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 32b0777..f52c94d 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -3552,11 +3552,9 @@ private: }; //---------------------------------------------------------------------------- -std::string cmTarget::GetLinkerLanguage(const std::string& config, - cmTarget const* head) const +std::string cmTarget::GetLinkerLanguage(const std::string& config) const { - cmTarget const* headTarget = head ? head : this; - return this->GetLinkClosure(config, headTarget)->LinkerLanguage; + return this->GetLinkClosure(config, this)->LinkerLanguage; } //---------------------------------------------------------------------------- @@ -3842,8 +3840,7 @@ bool cmTarget::HasSOName(const std::string& config) const return ((this->GetType() == cmTarget::SHARED_LIBRARY || this->GetType() == cmTarget::MODULE_LIBRARY) && !this->GetPropertyAsBool("NO_SONAME") && - this->Makefile->GetSONameFlag(this->GetLinkerLanguage(config, - this))); + this->Makefile->GetSONameFlag(this->GetLinkerLanguage(config))); } //---------------------------------------------------------------------------- @@ -4216,7 +4213,7 @@ void cmTarget::GetFullNameInternal(const std::string& config, const char* suffixVar = this->GetSuffixVariableInternal(implib); // Check for language-specific default prefix and suffix. - std::string ll = this->GetLinkerLanguage(config, this); + std::string ll = this->GetLinkerLanguage(config); if(!ll.empty()) { if(!targetSuffix && suffixVar && *suffixVar) @@ -4555,7 +4552,7 @@ bool cmTarget::NeedRelinkBeforeInstall(const std::string& config) const } // Check for rpath support on this platform. - std::string ll = this->GetLinkerLanguage(config, this); + std::string ll = this->GetLinkerLanguage(config); if(!ll.empty()) { std::string flagVar = "CMAKE_SHARED_LIBRARY_RUNTIME_"; @@ -5644,7 +5641,7 @@ bool cmTarget::IsChrpathUsed(const std::string& config) const #if defined(CMAKE_USE_ELF_PARSER) // Enable if the rpath flag uses a separator and the target uses ELF // binaries. - std::string ll = this->GetLinkerLanguage(config, this); + std::string ll = this->GetLinkerLanguage(config); if(!ll.empty()) { std::string sepVar = "CMAKE_SHARED_LIBRARY_RUNTIME_"; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 5bcbb3d..26a1e86 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -355,8 +355,7 @@ public: GetTargetVersion(bool soversion, int& major, int& minor, int& patch) const; ///! Return the preferred linker language for this target - std::string GetLinkerLanguage(const std::string& config = "", - cmTarget const* head = 0) const; + std::string GetLinkerLanguage(const std::string& config = "") const; /** Get the full name of the target according to the settings in its makefile. */ |