This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via bc64ce4c03a02fa7efb761eecffd4ad0ae824a14 (commit) via 30c103d29ebe3da61239ed1d66f4e86aa34101e8 (commit) via 98cb337e7658bb81c79ccbd3c93da87597597fda (commit) from 8b0b5703548877b08352b1b594fce4cbda0ade3c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc64ce4c03a02fa7efb761eecffd4ad0ae824a14 commit bc64ce4c03a02fa7efb761eecffd4ad0ae824a14 Merge: 8b0b570 30c103d Author: Clinton Stimpson <clin...@elemtech.com> AuthorDate: Wed Oct 8 10:59:43 2014 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Oct 8 10:59:43 2014 -0400 Merge topic 'rpath-osx-10_6' into next 30c103d2 OSX: Warn when attempting to change runtime paths on OS X 10.5 98cb337e Revert "OSX: Only enable @rpath support on OS X 10.6 or greater." http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30c103d29ebe3da61239ed1d66f4e86aa34101e8 commit 30c103d29ebe3da61239ed1d66f4e86aa34101e8 Author: Clinton Stimpson <clin...@elemtech.com> AuthorDate: Mon Oct 6 22:24:10 2014 -0600 Commit: Clinton Stimpson <clin...@elemtech.com> CommitDate: Wed Oct 8 08:58:15 2014 -0600 OSX: Warn when attempting to change runtime paths on OS X 10.5 Even though 10.5 supports @rpath, the support is not complete enough for CMake. For instance, install_name_tool doesn't support adding and removing rpaths. Also modifying BundleUtilities test to remove an undesirable cmake generated runtime path. The intent was to build with the install rpath as is done with the other cases in this test. diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 8a1c53e..1cb5b0f 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -688,35 +688,58 @@ cmInstallTargetGenerator cli->GetRPath(oldRuntimeDirs, false); cli->GetRPath(newRuntimeDirs, true); - // Note: These paths are kept unique to avoid install_name_tool corruption. - std::set<std::string> runpaths; - for(std::vector<std::string>::const_iterator i = oldRuntimeDirs.begin(); - i != oldRuntimeDirs.end(); ++i) + std::string darwin_major_version_s = + this->Target->GetMakefile()->GetSafeDefinition("DARWIN_MAJOR_VERSION"); + + std::stringstream ss(darwin_major_version_s); + int darwin_major_version; + ss >> darwin_major_version; + if(!ss.fail() && darwin_major_version <= 9 && + (!oldRuntimeDirs.empty() || !newRuntimeDirs.empty()) + ) { - std::string runpath = this->Target->GetMakefile()->GetLocalGenerator()-> - GetGlobalGenerator()->ExpandCFGIntDir(*i, config); - - if(runpaths.find(runpath) == runpaths.end()) - { - runpaths.insert(runpath); - os << indent << "execute_process(COMMAND " << installNameTool << "\n"; - os << indent << " -delete_rpath \"" << runpath << "\"\n"; - os << indent << " \"" << toDestDirPath << "\")\n"; - } + cmOStringStream msg; + msg << "WARNING: Target \"" << this->Target->GetName() + << "\" has runtime paths which cannot be changed during install. " + << "To change runtime paths, OS X version 10.6 or newer is required. " + << "Therefore, runtime paths will not be changed when installing."; + cmSystemTools::Message(msg.str().c_str(), "Warning"); } - - runpaths.clear(); - for(std::vector<std::string>::const_iterator i = newRuntimeDirs.begin(); - i != newRuntimeDirs.end(); ++i) + else { - std::string runpath = this->Target->GetMakefile()->GetLocalGenerator()-> - GetGlobalGenerator()->ExpandCFGIntDir(*i, config); + // Note: These paths are kept unique to avoid + // install_name_tool corruption. + std::set<std::string> runpaths; + for(std::vector<std::string>::const_iterator i = oldRuntimeDirs.begin(); + i != oldRuntimeDirs.end(); ++i) + { + std::string runpath = + this->Target->GetMakefile()->GetLocalGenerator()-> + GetGlobalGenerator()->ExpandCFGIntDir(*i, config); - if(runpaths.find(runpath) == runpaths.end()) + if(runpaths.find(runpath) == runpaths.end()) + { + runpaths.insert(runpath); + os << indent << "execute_process(COMMAND " << installNameTool <<"\n"; + os << indent << " -delete_rpath \"" << runpath << "\"\n"; + os << indent << " \"" << toDestDirPath << "\")\n"; + } + } + + runpaths.clear(); + for(std::vector<std::string>::const_iterator i = newRuntimeDirs.begin(); + i != newRuntimeDirs.end(); ++i) { - os << indent << "execute_process(COMMAND " << installNameTool << "\n"; - os << indent << " -add_rpath \"" << runpath << "\"\n"; - os << indent << " \"" << toDestDirPath << "\")\n"; + std::string runpath = + this->Target->GetMakefile()->GetLocalGenerator()-> + GetGlobalGenerator()->ExpandCFGIntDir(*i, config); + + if(runpaths.find(runpath) == runpaths.end()) + { + os << indent << "execute_process(COMMAND " << installNameTool <<"\n"; + os << indent << " -add_rpath \"" << runpath << "\"\n"; + os << indent << " \"" << toDestDirPath << "\")\n"; + } } } } diff --git a/Tests/BundleUtilities/CMakeLists.txt b/Tests/BundleUtilities/CMakeLists.txt index fb5e2cd..000b691 100644 --- a/Tests/BundleUtilities/CMakeLists.txt +++ b/Tests/BundleUtilities/CMakeLists.txt @@ -109,7 +109,8 @@ if(APPLE AND NOT CMAKE_SYSTEM_VERSION VERSION_LESS 10.0) target_link_libraries(testbundleutils3 shared-3 framework-3 ${CMAKE_DL_LIBS}) set_target_properties(testbundleutils3 module3 PROPERTIES - LINK_FLAGS "-Wl,-rpath,@loader_path/") + LINK_FLAGS "-Wl,-rpath,@loader_path/" + BUILD_WITH_INSTALL_RPATH 1) # add custom target to install and test the app add_custom_target(testbundleutils3_test ALL http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98cb337e7658bb81c79ccbd3c93da87597597fda commit 98cb337e7658bb81c79ccbd3c93da87597597fda Author: Clinton Stimpson <clin...@elemtech.com> AuthorDate: Wed Oct 8 08:50:31 2014 -0600 Commit: Clinton Stimpson <clin...@elemtech.com> CommitDate: Wed Oct 8 08:55:57 2014 -0600 Revert "OSX: Only enable @rpath support on OS X 10.6 or greater." This reverts commit 36c509b9c23725a9e731b4f68a5bfb209bf3cfa1. diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index 6a6b338..e5c5f36 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -30,8 +30,8 @@ set(CMAKE_SHARED_MODULE_SUFFIX ".so") set(CMAKE_MODULE_EXISTS 1) set(CMAKE_DL_LIBS "") -# Enable rpath support for 10.6 and greater where it is known to work. -if("${DARWIN_MAJOR_VERSION}" GREATER 9) +# Enable rpath support for 10.5 and greater where it is known to work. +if("${DARWIN_MAJOR_VERSION}" GREATER 8) set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") endif() diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index cc7d38b..b476a27 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -3742,7 +3742,7 @@ bool cmTarget::HasMacOSXRpathInstallNameDir(const std::string& config) const } w << " without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being set."; w << " This could be because you are using a Mac OS X version"; - w << " less than 10.6 or because CMake's platform configuration is"; + w << " less than 10.5 or because CMake's platform configuration is"; w << " corrupt."; cmake* cm = this->Makefile->GetCMakeInstance(); cm->IssueMessage(cmake::FATAL_ERROR, w.str(), this->GetBacktrace()); ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Darwin.cmake | 4 +- Source/cmInstallTargetGenerator.cxx | 71 ++++++++++++++++++++++------------ Source/cmTarget.cxx | 2 +- Tests/BundleUtilities/CMakeLists.txt | 3 +- 4 files changed, 52 insertions(+), 28 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits