summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-01-02 21:53:10 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2008-01-02 21:53:10 (GMT)
commit3da6fd9da4063faf05b85901d749fdc5c8f2d4ad (patch)
treef3caca22f4a8ed85d01f2c4f9320d0e73e886acf /Source
parent474629568c8b96b3883589a5dec8bba3cb0d53e0 (diff)
downloadCMake-3da6fd9da4063faf05b85901d749fdc5c8f2d4ad.zip
CMake-3da6fd9da4063faf05b85901d749fdc5c8f2d4ad.tar.gz
CMake-3da6fd9da4063faf05b85901d749fdc5c8f2d4ad.tar.bz2
ENH: only allow usage of chrpath if the executable file format is ELF
Alex
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 747f169..14922c7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2537,7 +2537,8 @@ void cmTarget::GetLanguages(std::set<cmStdString>& languages) const
bool cmTarget::IsChrpathAvailable()
{
- //only return true if the flag is "-Wl,rpath," amd the separator is not empty
+ //only return true if chrpath has been found (happens only if the executable
+ // format is ELF) and if the separator is not empty
if (this->Makefile->IsSet("CMAKE_CHRPATH")==false)
{
return false;
@@ -2550,10 +2551,9 @@ bool cmTarget::IsChrpathAvailable()
return false;
}
- std::string runTimeFlagVar = "CMAKE_SHARED_LIBRARY_RUNTIME_";
- runTimeFlagVar += linkLanguage;
- runTimeFlagVar += "_FLAG";
- std::string runTimeFlagSepVar = runTimeFlagVar + "_SEP";
+ std::string runTimeFlagSepVar = "CMAKE_SHARED_LIBRARY_RUNTIME_";
+ runTimeFlagSepVar += linkLanguage;
+ runTimeFlagSepVar += "_FLAG_SEP";
std::string runtimeSep =
this->Makefile->GetSafeDefinition(runTimeFlagSepVar.c_str());
@@ -2563,13 +2563,5 @@ bool cmTarget::IsChrpathAvailable()
return 0;
}
- std::string runtimeFlag =
- this->Makefile->GetSafeDefinition(runTimeFlagVar.c_str());
-
- if (runtimeFlag!="-Wl,-rpath,")
- {
- return false;
- }
-
return true;
}