[Cmake-commits] CMake branch, next, updated. v3.6.2-1951-gfc24ddf

Brad King brad.king at kitware.com
Mon Sep 12 11:44:52 EDT 2016


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  fc24ddfc9b93d8a7c4ca1ab8fe5c4a50804a0a56 (commit)
       via  9370b697e994e3b85549f07cbd54223e3e5d714f (commit)
      from  0d40713426baaf6368eea90012c431656501d28d (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc24ddfc9b93d8a7c4ca1ab8fe5c4a50804a0a56
commit fc24ddfc9b93d8a7c4ca1ab8fe5c4a50804a0a56
Merge: 0d40713 9370b69
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 12 11:44:52 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 12 11:44:52 2016 -0400

    Merge topic 'link-generated-rpaths-first' into next
    
    9370b697 Re-order link line to place RPATH entries before libraries


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9370b697e994e3b85549f07cbd54223e3e5d714f
commit 9370b697e994e3b85549f07cbd54223e3e5d714f
Author:     Dan Kegel <dank at oblong.com>
AuthorDate: Fri Sep 9 13:45:41 2016 -0700
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 12 10:51:18 2016 -0400

    Re-order link line to place RPATH entries before libraries
    
    Since we support adding arbitrary flags to the link line via
    `target_link_libraries` the project/user may add their own RPATH flags
    (typically for system library locations).  Re-order the link line to
    place our generated RPATH entries before the libraries so that they also
    come before flag-specified entries.  Otherwise our in-build-tree RPATH
    entries may not be preferred by the dynamic loader and we could collide
    with libraries in the system directories.
    
    Closes: #16293

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 694a9f6..c0ecba3 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1531,9 +1531,6 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
     linkLibs += " ";
   }
 
-  // Write the library flags to the build rule.
-  fout << linkLibs;
-
   // Check what kind of rpath flags to use.
   if (cli.GetRuntimeSep().empty()) {
     // Each rpath entry gets its own option ("-R a -R b -R c")
@@ -1560,6 +1557,9 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
     }
   }
 
+  // Write the library flags to the build rule.
+  fout << linkLibs;
+
   // Add the linker runtime search path if any.
   std::string rpath_link = cli.GetRPathLinkString();
   if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) {

-----------------------------------------------------------------------

Summary of changes:
 Source/cmLocalGenerator.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list