[Cmake-commits] CMake branch, next, updated. v2.8.12-4792-gaeac10b

Brad King brad.king at kitware.com
Sat Nov 2 12:22:51 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  aeac10b01f7d3bc1200ff8a0168213677aea2e94 (commit)
       via  00c442f54f057a403b2d40caeba5cc73003aea5a (commit)
      from  4580b5a73ecfb1c0d6f6e3e5fc96f3949fc67b26 (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=aeac10b01f7d3bc1200ff8a0168213677aea2e94
commit aeac10b01f7d3bc1200ff8a0168213677aea2e94
Merge: 4580b5a 00c442f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sat Nov 2 12:22:44 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Nov 2 12:22:44 2013 -0400

    Merge topic 'handle-only-plain-tll' into next
    
    00c442f Revert topic 'handle-only-plain-tll'


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=00c442f54f057a403b2d40caeba5cc73003aea5a
commit 00c442f54f057a403b2d40caeba5cc73003aea5a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sat Nov 2 12:21:31 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Sat Nov 2 12:21:31 2013 -0400

    Revert topic 'handle-only-plain-tll'
    
    It will be replaced by another revision of this fix.

diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index a30c5e4..ef336ea 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -631,7 +631,6 @@ cmExportFileGenerator
 
   if (iface->ImplementationIsInterface)
     {
-    // Policy CMP0022 must not be NEW.
     this->SetImportLinkProperty(suffix, target,
                                 "IMPORTED_LINK_INTERFACE_LIBRARIES",
                                 iface->Libraries, properties, missingTargets);
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 4425011..ac655da 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6590,10 +6590,9 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
     }
   else if (this->GetPolicyStatusCMP0022() == cmPolicies::WARN
         || this->GetPolicyStatusCMP0022() == cmPolicies::OLD)
-    // If CMP0022 is NEW then the plain tll signature sets the
-    // INTERFACE_LINK_LIBRARIES, so if we get here then the project
-    // cleared the property explicitly and we should not fall back
-    // to the link implementation.
+    // The implementation shouldn't be the interface if CMP0022 is NEW. That
+    // way, the LINK_LIBRARIES property can be set directly without having to
+    // empty the INTERFACE_LINK_LIBRARIES
     {
     // The link implementation is the default link interface.
     LinkImplementation const* impl = this->GetLinkImplementation(config,
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 928c550..863b391 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -373,10 +373,6 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
         }
     }
 
-  bool oldCMP0022 =
-    (this->Target->GetPolicyStatusCMP0022() == cmPolicies::OLD ||
-     this->Target->GetPolicyStatusCMP0022() == cmPolicies::WARN);
-
   // Handle normal case first.
   if(this->CurrentProcessingState != ProcessingKeywordLinkInterface
       && this->CurrentProcessingState != ProcessingPlainLinkInterface)
@@ -384,9 +380,7 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
     this->Makefile
       ->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt);
     if (this->CurrentProcessingState != ProcessingKeywordPublicInterface
-        && this->CurrentProcessingState != ProcessingPlainPublicInterface
-        && (this->CurrentProcessingState != ProcessingLinkLibraries
-            || oldCMP0022))
+        && this->CurrentProcessingState != ProcessingPlainPublicInterface)
       {
       if (this->Target->GetType() == cmTarget::STATIC_LIBRARY)
         {
@@ -404,7 +398,11 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
   this->Target->AppendProperty("INTERFACE_LINK_LIBRARIES",
               this->Target->GetDebugGeneratorExpressions(lib, llt).c_str());
 
-  if (!oldCMP0022)
+  const cmPolicies::PolicyStatus policy22Status
+                      = this->Target->GetPolicyStatusCMP0022();
+
+  if (policy22Status != cmPolicies::OLD
+      && policy22Status != cmPolicies::WARN)
     {
     return true;
     }
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
index cd174d2..07d7c43 100644
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
@@ -25,10 +25,3 @@ target_link_libraries(staticlib1 LINK_PUBLIC staticlib2)
 
 add_executable(staticlib_exe staticlib_exe.cpp)
 target_link_libraries(staticlib_exe staticlib1)
-
-add_library(onlyplainlib1 SHARED onlyplainlib1.cpp)
-add_library(onlyplainlib2 SHARED onlyplainlib2.cpp)
-target_link_libraries(onlyplainlib2 onlyplainlib1)
-
-add_executable(onlyplainlib_user onlyplainlib_user.cpp)
-target_link_libraries(onlyplainlib_user onlyplainlib2)
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp
deleted file mode 100644
index 41dc3ce..0000000
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-
-#include "onlyplainlib1.h"
-
-OnlyPlainLib1::OnlyPlainLib1()
-  : result(0)
-{
-
-}
-
-int OnlyPlainLib1::GetResult()
-{
-  return result;
-}
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
deleted file mode 100644
index c0373ce..0000000
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
+++ /dev/null
@@ -1,14 +0,0 @@
-
-struct
-#ifdef _WIN32
-__declspec(dllexport)
-#endif
-OnlyPlainLib1
-{
-  OnlyPlainLib1();
-
-  int GetResult();
-
-private:
-  int result;
-};
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp
deleted file mode 100644
index 2865ae9..0000000
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-
-#include "onlyplainlib2.h"
-
-OnlyPlainLib1 onlyPlainLib2()
-{
-  OnlyPlainLib1 opl1;
-  return opl1;
-}
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
deleted file mode 100644
index 74b18a0..0000000
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
+++ /dev/null
@@ -1,7 +0,0 @@
-
-#include "onlyplainlib1.h"
-
-#ifdef _WIN32
-__declspec(dllexport)
-#endif
-OnlyPlainLib1 onlyPlainLib2();
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp
deleted file mode 100644
index 0fb7b0a..0000000
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-
-#include "onlyplainlib2.h"
-
-int main(int argc, char **argv)
-{
-  return onlyPlainLib2().GetResult();
-}

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

Summary of changes:
 Source/cmExportFileGenerator.cxx                   |    1 -
 Source/cmTarget.cxx                                |    7 +++----
 Source/cmTargetLinkLibrariesCommand.cxx            |   14 ++++++--------
 .../target_link_libraries/cmp0022/CMakeLists.txt   |    7 -------
 .../cmp0022/onlyplainlib1.cpp                      |   13 -------------
 .../target_link_libraries/cmp0022/onlyplainlib1.h  |   14 --------------
 .../cmp0022/onlyplainlib2.cpp                      |    8 --------
 .../target_link_libraries/cmp0022/onlyplainlib2.h  |    7 -------
 .../cmp0022/onlyplainlib_user.cpp                  |    7 -------
 9 files changed, 9 insertions(+), 69 deletions(-)
 delete mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp
 delete mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
 delete mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp
 delete mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
 delete mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list