diff options
author | Brad King <brad.king@kitware.com> | 2009-07-07 11:44:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-07 11:44:12 (GMT) |
commit | a60846718048e33db01e7993ba7d6fa994e0c8b5 (patch) | |
tree | 6bac297b484b07daa28e5c320848a7d0ea0f2e03 /Source/cmTarget.cxx | |
parent | 6ec20cc3f9cddcb7c817a29874bb0fb0c6ab509b (diff) | |
download | CMake-a60846718048e33db01e7993ba7d6fa994e0c8b5.zip CMake-a60846718048e33db01e7993ba7d6fa994e0c8b5.tar.gz CMake-a60846718048e33db01e7993ba7d6fa994e0c8b5.tar.bz2 |
ENH: Simpler cmTarget::GetLinkerLanguage signature
This method previously required the global generator to be passed, but
that was left from before cmTarget had its Makefile member. Now the
global generator can be retrieved automatically, so we can drop the
method argument.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ca64402..5883274 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2283,8 +2283,10 @@ bool cmTarget::GetPropertyAsBool(const char* prop) } //---------------------------------------------------------------------------- -const char* cmTarget::GetLinkerLanguage(cmGlobalGenerator* gg) +const char* cmTarget::GetLinkerLanguage() { + cmGlobalGenerator* gg = + this->Makefile->GetLocalGenerator()->GetGlobalGenerator(); if(this->GetProperty("HAS_CXX")) { const_cast<cmTarget*>(this)->SetProperty("LINKER_LANGUAGE", "CXX"); @@ -2669,9 +2671,7 @@ void cmTarget::GetFullNameInternal(const char* config, } const char* prefixVar = this->GetPrefixVariableInternal(implib); const char* suffixVar = this->GetSuffixVariableInternal(implib); - const char* ll = - this->GetLinkerLanguage( - this->Makefile->GetLocalGenerator()->GetGlobalGenerator()); + const char* ll = this->GetLinkerLanguage(); // first try language specific suffix if(ll) { @@ -2750,9 +2750,7 @@ void cmTarget::GetLibraryNames(std::string& name, } // Construct the name of the soname flag variable for this language. - const char* ll = - this->GetLinkerLanguage( - this->Makefile->GetLocalGenerator()->GetGlobalGenerator()); + const char* ll = this->GetLinkerLanguage(); std::string sonameFlag = "CMAKE_SHARED_LIBRARY_SONAME"; if(ll) { @@ -3042,8 +3040,7 @@ bool cmTarget::NeedRelinkBeforeInstall() } // Check for rpath support on this platform. - if(const char* ll = this->GetLinkerLanguage( - this->Makefile->GetLocalGenerator()->GetGlobalGenerator())) + if(const char* ll = this->GetLinkerLanguage()) { std::string flagVar = "CMAKE_SHARED_LIBRARY_RUNTIME_"; flagVar += ll; @@ -3368,8 +3365,7 @@ bool cmTarget::IsChrpathUsed() // Enable if the rpath flag uses a separator and the target uses ELF // binaries. - if(const char* ll = this->GetLinkerLanguage( - this->Makefile->GetLocalGenerator()->GetGlobalGenerator())) + if(const char* ll = this->GetLinkerLanguage()) { std::string sepVar = "CMAKE_SHARED_LIBRARY_RUNTIME_"; sepVar += ll; |