[cmake-commits] alex committed cmTarget.cxx 1.170 1.171

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jan 2 16:53:12 EST 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv14952

Modified Files:
	cmTarget.cxx 
Log Message:
ENH: only allow usage of chrpath if the executable file format is ELF

Alex


Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -d -r1.170 -r1.171
--- cmTarget.cxx	30 Dec 2007 21:11:38 -0000	1.170
+++ cmTarget.cxx	2 Jan 2008 21:53:10 -0000	1.171
@@ -2537,7 +2537,8 @@
 
 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 @@
     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 @@
     return 0;
     }
 
-  std::string runtimeFlag = 
-                     this->Makefile->GetSafeDefinition(runTimeFlagVar.c_str());
-
-  if (runtimeFlag!="-Wl,-rpath,")
-    {
-    return false;
-    }
-
   return true;
 }



More information about the Cmake-commits mailing list