[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-179-g856628d

Brad King brad.king at kitware.com
Fri Oct 7 08:44:50 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  856628d05cef2d84b3c5c33ff13ff016c2244022 (commit)
       via  0f1fedbd6a298cf9af2f36577cc66c4ee167be3d (commit)
      from  1e663d26f306bbfda333aa57e7664865596f1878 (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=856628d05cef2d84b3c5c33ff13ff016c2244022
commit 856628d05cef2d84b3c5c33ff13ff016c2244022
Merge: 1e663d2 0f1fedb
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Oct 7 08:44:48 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Oct 7 08:44:48 2016 -0400

    Merge topic 'CMP0065-LINK_FLAGS' into next
    
    0f1fedbd CMP0065: Put computed flags into LINK_FLAGS not LINK_LIBRARIES


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f1fedbd6a298cf9af2f36577cc66c4ee167be3d
commit 0f1fedbd6a298cf9af2f36577cc66c4ee167be3d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 6 22:25:44 2016 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Oct 7 08:42:25 2016 -0400

    CMP0065: Put computed flags into LINK_FLAGS not LINK_LIBRARIES
    
    These flags are redundant anyway in the NEW case of the policy, and
    could be merged with CMAKE_EXE_EXPORTS_${lang}_FLAG content for that
    case.  That is deferred to the future, but now at least the similar code
    is located close to each other.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index a0f6423..3fabd53 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1248,6 +1248,14 @@ void cmLocalGenerator::GetTargetFlags(
         linkFlags += this->Makefile->GetSafeDefinition(exportFlagVar);
         linkFlags += " ";
       }
+
+      std::string cmp0065Flags =
+        this->GetLinkLibsCMP0065(linkLanguage, *target);
+      if (!cmp0065Flags.empty()) {
+        linkFlags += cmp0065Flags;
+        linkFlags += " ";
+      }
+
       const char* targetLinkFlags = target->GetProperty("LINK_FLAGS");
       if (targetLinkFlags) {
         linkFlags += targetLinkFlags;
@@ -1430,7 +1438,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
 
   std::string linkLanguage = cli.GetLinkLanguage();
 
-  std::string linkLibs = this->GetLinkLibsCMP0065(linkLanguage, tgt);
+  std::string linkLibs;
 
   std::string libPathFlag =
     this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG");
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index cb20117..42e12ad 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -192,6 +192,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
     this->LocalGenerator->AppendFlags(
       linkFlags, this->Makefile->GetDefinition(export_flag_var));
   }
+
+  this->LocalGenerator->AppendFlags(linkFlags,
+                                    this->LocalGenerator->GetLinkLibsCMP0065(
+                                      linkLanguage, *this->GeneratorTarget));
+
   if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) {
     this->LocalGenerator->AppendFlags(linkFlags, " -Wl,--no-as-needed");
   }

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list