diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-04 17:19:46 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-05 16:20:47 (GMT) |
commit | e27d737e27fbfc8cfde020ec02d6b2c74afb6885 (patch) | |
tree | 895ab57e59489993a842ff5b8f081988f5dfc9d1 /Source/cmTarget.cxx | |
parent | 8d2de00244f8338664c16bd8d8ebb03c6f0cb83f (diff) | |
download | CMake-e27d737e27fbfc8cfde020ec02d6b2c74afb6885.zip CMake-e27d737e27fbfc8cfde020ec02d6b2c74afb6885.tar.gz CMake-e27d737e27fbfc8cfde020ec02d6b2c74afb6885.tar.bz2 |
cmGeneratorTarget: Move IsChrPathUsed from cmTarget.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 8dd62f9..1183fe4 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -4314,73 +4314,6 @@ void cmTarget::GetLanguages(std::set<std::string>& languages, } //---------------------------------------------------------------------------- -bool cmTarget::IsChrpathUsed(const std::string& config) const -{ - // Only certain target types have an rpath. - if(!(this->GetType() == cmTarget::SHARED_LIBRARY || - this->GetType() == cmTarget::MODULE_LIBRARY || - this->GetType() == cmTarget::EXECUTABLE)) - { - return false; - } - - // If the target will not be installed we do not need to change its - // rpath. - if(!this->GetHaveInstallRule()) - { - return false; - } - - // Skip chrpath if skipping rpath altogether. - if(this->Makefile->IsOn("CMAKE_SKIP_RPATH")) - { - return false; - } - - // Skip chrpath if it does not need to be changed at install time. - if(this->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH")) - { - return false; - } - - // Allow the user to disable builtin chrpath explicitly. - if(this->Makefile->IsOn("CMAKE_NO_BUILTIN_CHRPATH")) - { - return false; - } - - if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME")) - { - return true; - } - -#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); - if(!ll.empty()) - { - std::string sepVar = "CMAKE_SHARED_LIBRARY_RUNTIME_"; - sepVar += ll; - sepVar += "_FLAG_SEP"; - const char* sep = this->Makefile->GetDefinition(sepVar); - if(sep && *sep) - { - // TODO: Add ELF check to ABI detection and get rid of - // CMAKE_EXECUTABLE_FORMAT. - if(const char* fmt = - this->Makefile->GetDefinition("CMAKE_EXECUTABLE_FORMAT")) - { - return strcmp(fmt, "ELF") == 0; - } - } - } -#endif - static_cast<void>(config); - return false; -} - -//---------------------------------------------------------------------------- cmTarget::ImportInfo const* cmTarget::GetImportInfo(const std::string& config) const { |