[Cmake-commits] CMake branch, next, updated. v2.8.12-4307-g359e0b4

Stephen Kelly steveire at gmail.com
Tue Oct 22 17:31:48 EDT 2013


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  359e0b49029ebf7be5bfbb2e71341f3a80deffc8 (commit)
       via  52699b687d52aa4fec52d13cc3f7b58d82b80dcc (commit)
      from  d59cb5881ebc40182580bb1c94013fca4ddb75eb (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=359e0b49029ebf7be5bfbb2e71341f3a80deffc8
commit 359e0b49029ebf7be5bfbb2e71341f3a80deffc8
Merge: d59cb58 52699b6
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Oct 22 17:31:42 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Oct 22 17:31:42 2013 -0400

    Merge topic 'fix-tll-static-private' into next
    
    52699b6 Revert "Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52699b687d52aa4fec52d13cc3f7b58d82b80dcc
commit 52699b687d52aa4fec52d13cc3f7b58d82b80dcc
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Oct 22 23:31:27 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Oct 22 23:31:27 2013 +0200

    Revert "Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES."
    
    This reverts commit b57f413700f67ad13d365f0de534e59f4974dc3a.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 0b40d08..b6182ab 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -985,20 +985,15 @@ void cmTarget::MergeLinkLibraries( cmMakefile& mf,
   i += this->PrevLinkedLibraries.size();
   for( ; i != libs.end(); ++i )
     {
-    const char *lib = i->first.c_str();
     // We call this so that the dependencies get written to the cache
-    this->AddLinkLibrary( mf, selfname, lib, i->second );
+    this->AddLinkLibrary( mf, selfname, i->first.c_str(), i->second );
 
     if (this->GetType() == cmTarget::STATIC_LIBRARY)
       {
-      std::string configLib = this->GetDebugGeneratorExpressions(lib,
-                                                                 i->second);
-      if (cmGeneratorExpression::IsValidTargetName(lib)
-          || cmGeneratorExpression::Find(lib) != std::string::npos)
-        {
-        configLib = "$<LINK_ONLY:" + configLib + ">";
-        }
-        this->AppendProperty("INTERFACE_LINK_LIBRARIES", configLib.c_str());
+      this->AppendProperty("INTERFACE_LINK_LIBRARIES",
+            ("$<LINK_ONLY:" +
+            this->GetDebugGeneratorExpressions(i->first.c_str(), i->second) +
+            ">").c_str());
       }
     }
   this->PrevLinkedLibraries = libs;
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 9add198..0707c62 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -395,15 +395,10 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
       {
       if (this->Target->GetType() == cmTarget::STATIC_LIBRARY)
         {
-        std::string configLib = this->Target
-                                     ->GetDebugGeneratorExpressions(lib, llt);
-        if (cmGeneratorExpression::IsValidTargetName(lib)
-            || cmGeneratorExpression::Find(lib) != std::string::npos)
-          {
-          configLib = "$<LINK_ONLY:" + configLib + ">";
-          }
         this->Target->AppendProperty("INTERFACE_LINK_LIBRARIES",
-                                     configLib.c_str());
+                  ("$<LINK_ONLY:" +
+                  this->Target->GetDebugGeneratorExpressions(lib, llt) +
+                  ">").c_str());
         }
       // Not a 'public' or 'interface' library. Do not add to interface
       // property.
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
index b20be2c..07d7c43 100644
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
@@ -21,10 +21,7 @@ add_library(staticlib1 STATIC staticlib1.cpp)
 generate_export_header(staticlib1)
 add_library(staticlib2 STATIC staticlib2.cpp)
 generate_export_header(staticlib2)
-add_library(staticlib3 STATIC staticlib3.cpp)
-generate_export_header(staticlib3)
 target_link_libraries(staticlib1 LINK_PUBLIC staticlib2)
-target_link_libraries(staticlib1 LINK_PRIVATE "-Wl,--start-group -lstaticlib3 -Wl,--end-group")
 
 add_executable(staticlib_exe staticlib_exe.cpp)
 target_link_libraries(staticlib_exe staticlib1)
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib3.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib3.cpp
deleted file mode 100644
index 570a911..0000000
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib3.cpp
+++ /dev/null
@@ -1,2 +0,0 @@
-
-int staticlib3() { return 0; }
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib3.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib3.h
deleted file mode 100644
index 9c88522..0000000
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib3.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifdef _WIN32
-__declspec(dllexport)
-#endif
-int staticlib3();
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake
index 884db39..3e4144f 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake
@@ -5,4 +5,4 @@ add_library(foo STATIC empty_vs6_1.cpp)
 add_library(bar STATIC empty_vs6_2.cpp)
 add_library(bat STATIC empty_vs6_3.cpp)
 target_link_libraries(foo bar)
-target_link_libraries(bar bat "-lz -lm")
+target_link_libraries(bar bat)

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

Summary of changes:
 Source/cmTarget.cxx                                |   15 +++++----------
 Source/cmTargetLinkLibrariesCommand.cxx            |   11 +++--------
 .../target_link_libraries/cmp0022/CMakeLists.txt   |    3 ---
 .../target_link_libraries/cmp0022/staticlib3.cpp   |    2 --
 .../target_link_libraries/cmp0022/staticlib3.h     |    4 ----
 Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake |    2 +-
 6 files changed, 9 insertions(+), 28 deletions(-)
 delete mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib3.cpp
 delete mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib3.h


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list