[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3333-g03702f0

Brad King brad.king at kitware.com
Wed Jul 24 11:41:53 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  03702f00f9513f9361f8f99e6786d002bfdaecd0 (commit)
       via  d5f25b3690bf766379a494bf4d824566c6e10a2e (commit)
      from  feee361441c3fc37e193c983d1503c06bcc2acc2 (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=03702f00f9513f9361f8f99e6786d002bfdaecd0
commit 03702f00f9513f9361f8f99e6786d002bfdaecd0
Merge: feee361 d5f25b3
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jul 24 11:41:51 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jul 24 11:41:51 2013 -0400

    Merge topic 'tll-new-signatures' into next
    
    d5f25b3 Rewrite documentation of CMP0023


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5f25b3690bf766379a494bf4d824566c6e10a2e
commit d5f25b3690bf766379a494bf4d824566c6e10a2e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jul 24 11:38:29 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jul 24 11:38:29 2013 -0400

    Rewrite documentation of CMP0023
    
    Provide motivating example.

diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index d95ca6b..6054b34 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -578,11 +578,23 @@ cmPolicies::cmPolicies()
 
   this->DefinePolicy(
     CMP0023, "CMP0023",
-    "Similar target_link_libraries signatures can not be mixed.",
-    "CMake 2.8.12 included new keyword signatures for the "
-    "target_link_libraries command.  If this policy is NEW, the new keyword "
-    "signatures and the old plain signatures can not both be used on the "
-    "same target.  Attempting to do so will result in an error."
+    "Plain and keyword target_link_libraries signatures cannot be mixed.",
+    "CMake 2.8.12 introduced the target_link_libraries signature using "
+    "the PUBLIC, PRIVATE, and INTERFACE keywords to generalize the "
+    "LINK_PUBLIC and LINK_PRIVATE keywords introduced in CMake 2.8.7.  "
+    "Use of signatures with any of these keywords sets the link interface "
+    "of a target explicitly, even if empty.  "
+    "This produces confusing behavior when used in combination with the "
+    "historical behavior of the plain target_link_libraries signature.  "
+    "For example, consider the code:\n"
+    " target_link_libraries(mylib A)\n"
+    " target_link_libraries(mylib PRIVATE B)\n"
+    "After the first line the link interface has not been set explicitly "
+    "so CMake would use the link implementation, A, as the link interface.  "
+    "However, the second line sets the link interface to empty.  "
+    "In order to avoid this subtle behavior CMake now prefers to disallow "
+    "mixing the plain and keyword signatures of target_link_libraries for "
+    "a single target."
     "\n"
     "The OLD behavior for this policy is to allow keyword and plain "
     "target_link_libraries signatures to be mixed.  "
diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt
index 0c9f1e6..d27686d 100644
--- a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt
+++ b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt
@@ -1,7 +1,8 @@
 CMake Error at CMP0023-NEW-2.cmake:11 \(target_link_libraries\):
-  Policy CMP0023 is not set: Similar target_link_libraries signatures can not
-  be mixed.  Run "cmake --help-policy CMP0023" for policy details.  Use the
-  cmake_policy command to set the policy and suppress this warning.
+  Policy CMP0023 is not set: Plain and keyword target_link_libraries
+  signatures cannot be mixed.  Run "cmake --help-policy CMP0023" for policy
+  details.  Use the cmake_policy command to set the policy and suppress this
+  warning.
 
   The plain signature for target_link_libraries has already been used with
   the target "foo".  All uses of target_link_libraries with a target must be
diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt
index 9ceace7..d7be0ff 100644
--- a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt
+++ b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt
@@ -1,7 +1,8 @@
 CMake Error at CMP0023-NEW.cmake:11 \(target_link_libraries\):
-  Policy CMP0023 is not set: Similar target_link_libraries signatures can not
-  be mixed.  Run "cmake --help-policy CMP0023" for policy details.  Use the
-  cmake_policy command to set the policy and suppress this warning.
+  Policy CMP0023 is not set: Plain and keyword target_link_libraries
+  signatures cannot be mixed.  Run "cmake --help-policy CMP0023" for policy
+  details.  Use the cmake_policy command to set the policy and suppress this
+  warning.
 
   The plain signature for target_link_libraries has already been used with
   the target "foo".  All uses of target_link_libraries with a target must be
diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt
index 7aa307f..5147861 100644
--- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt
+++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt
@@ -1,7 +1,8 @@
 CMake Warning \(dev\) at CMP0023-WARN-2.cmake:9 \(target_link_libraries\):
-  Policy CMP0023 is not set: Similar target_link_libraries signatures can not
-  be mixed.  Run "cmake --help-policy CMP0023" for policy details.  Use the
-  cmake_policy command to set the policy and suppress this warning.
+  Policy CMP0023 is not set: Plain and keyword target_link_libraries
+  signatures cannot be mixed.  Run "cmake --help-policy CMP0023" for policy
+  details.  Use the cmake_policy command to set the policy and suppress this
+  warning.
 
   The plain signature for target_link_libraries has already been used with
   the target "foo".  All uses of target_link_libraries with a target should
diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt
index c430bef..a7474fa 100644
--- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt
+++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt
@@ -1,7 +1,8 @@
 CMake Warning \(dev\) at CMP0023-WARN.cmake:9 \(target_link_libraries\):
-  Policy CMP0023 is not set: Similar target_link_libraries signatures can not
-  be mixed.  Run "cmake --help-policy CMP0023" for policy details.  Use the
-  cmake_policy command to set the policy and suppress this warning.
+  Policy CMP0023 is not set: Plain and keyword target_link_libraries
+  signatures cannot be mixed.  Run "cmake --help-policy CMP0023" for policy
+  details.  Use the cmake_policy command to set the policy and suppress this
+  warning.
 
   The plain signature for target_link_libraries has already been used with
   the target "foo".  All uses of target_link_libraries with a target should

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

Summary of changes:
 Source/cmPolicies.cxx                              |   22 +++++++++++++++----
 .../target_link_libraries/CMP0023-NEW-2-stderr.txt |    7 +++--
 .../target_link_libraries/CMP0023-NEW-stderr.txt   |    7 +++--
 .../CMP0023-WARN-2-stderr.txt                      |    7 +++--
 .../target_link_libraries/CMP0023-WARN-stderr.txt  |    7 +++--
 5 files changed, 33 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list