[Cmake-commits] CMake branch, next, updated. v3.2.2-2297-g33c8f18

Brad King brad.king at kitware.com
Wed Apr 29 11:34:48 EDT 2015


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  33c8f183e57d5f98c1862fba269bdddf8b01e3c9 (commit)
       via  9535b86d3c0d0c124d8ed29a6b3cdb45c150098b (commit)
      from  24368f24852b5125b8b89f53007d9c03611e9880 (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=33c8f183e57d5f98c1862fba269bdddf8b01e3c9
commit 33c8f183e57d5f98c1862fba269bdddf8b01e3c9
Merge: 24368f2 9535b86
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 29 11:34:47 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Apr 29 11:34:47 2015 -0400

    Merge topic 'doc-CMP0054-example' into next
    
    9535b86d Help: Replace CMP0054 example to show when it makes a difference


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9535b86d3c0d0c124d8ed29a6b3cdb45c150098b
commit 9535b86d3c0d0c124d8ed29a6b3cdb45c150098b
Author:     Tamás Kenéz <tamas.kenez at gmail.com>
AuthorDate: Wed Apr 29 15:46:16 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 29 11:25:16 2015 -0400

    Help: Replace CMP0054 example to show when it makes a difference
    
    The previous example for CMP0054 did not show how critical the policy is
    since the result is the same in both cases (NEW and OLD behavior).
    Instead show an example when the policy does make a difference.

diff --git a/Help/policy/CMP0054.rst b/Help/policy/CMP0054.rst
index 39f0c40..3754fda 100644
--- a/Help/policy/CMP0054.rst
+++ b/Help/policy/CMP0054.rst
@@ -16,29 +16,33 @@ Given the following partial example:
 
 ::
 
-  set(MONKEY 1)
-  set(ANIMAL MONKEY)
+  set(A E)
+  set(E "")
 
-  if("${ANIMAL}" STREQUAL "MONKEY")
+  if("${A}" STREQUAL "")
+    message("Result is TRUE before CMake 3.1 or when CMP0054 is OLD")
+  else()
+    message("Result is FALSE in CMake 3.1 and above if CMP0054 is NEW")
+  endif()
 
 After explicit expansion of variables this gives:
 
 ::
 
-  if("MONKEY" STREQUAL "MONKEY")
+  if("E" STREQUAL "")
 
 With the policy set to ``OLD`` implicit expansion reduces this semantically to:
 
 ::
 
-  if("1" STREQUAL "1")
+  if("" STREQUAL "")
 
 With the policy set to ``NEW`` the quoted arguments will not be
 further dereferenced:
 
 ::
 
-  if("MONKEY" STREQUAL "MONKEY")
+  if("E" STREQUAL "")
 
 This policy was introduced in CMake version 3.1.
 CMake version |release| warns when the policy is not set and uses

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

Summary of changes:
 Help/policy/CMP0054.rst |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list