[Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1118-g9bb68ec

Nils Gladitz nilsgladitz at gmail.com
Tue Dec 9 15:54:55 EST 2014


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  9bb68ece44b1aa88e5bb0fbf2f053e96a2fc5a57 (commit)
       via  c6dcb83b8ea949936ea257b0b7cc0aaab2f2466c (commit)
      from  c58581c63a990ff54882b61c64249a63a37b9d51 (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=9bb68ece44b1aa88e5bb0fbf2f053e96a2fc5a57
commit 9bb68ece44b1aa88e5bb0fbf2f053e96a2fc5a57
Merge: c58581c c6dcb83
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Tue Dec 9 15:54:54 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Dec 9 15:54:54 2014 -0500

    Merge topic 'extend-CMP0054-doc' into next
    
    c6dcb83b CMP0054: Extend policy documentation with an example


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6dcb83b8ea949936ea257b0b7cc0aaab2f2466c
commit c6dcb83b8ea949936ea257b0b7cc0aaab2f2466c
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Tue Dec 9 21:52:23 2014 +0100
Commit:     Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Tue Dec 9 21:52:23 2014 +0100

    CMP0054: Extend policy documentation with an example

diff --git a/Help/policy/CMP0054.rst b/Help/policy/CMP0054.rst
index dffee5e..39f0c40 100644
--- a/Help/policy/CMP0054.rst
+++ b/Help/policy/CMP0054.rst
@@ -3,15 +3,43 @@ CMP0054
 
 Only interpret :command:`if` arguments as variables or keywords when unquoted.
 
-CMake 3.1 and above no longer dereference variables or interpret keywords
-in an :command:`if` command argument when it is a :ref:`Quoted Argument`
-or a :ref:`Bracket Argument`.
+CMake 3.1 and above no longer implicitly dereference variables or
+interpret keywords in an :command:`if` command argument when
+it is a :ref:`Quoted Argument` or a :ref:`Bracket Argument`.
 
 The ``OLD`` behavior for this policy is to dereference variables and
 interpret keywords even if they are quoted or bracketed.
 The ``NEW`` behavior is to not dereference variables or interpret keywords
 that have been quoted or bracketed.
 
+Given the following partial example:
+
+::
+
+  set(MONKEY 1)
+  set(ANIMAL MONKEY)
+
+  if("${ANIMAL}" STREQUAL "MONKEY")
+
+After explicit expansion of variables this gives:
+
+::
+
+  if("MONKEY" STREQUAL "MONKEY")
+
+With the policy set to ``OLD`` implicit expansion reduces this semantically to:
+
+::
+
+  if("1" STREQUAL "1")
+
+With the policy set to ``NEW`` the quoted arguments will not be
+further dereferenced:
+
+::
+
+  if("MONKEY" STREQUAL "MONKEY")
+
 This policy was introduced in CMake version 3.1.
 CMake version |release| warns when the policy is not set and uses
 ``OLD`` behavior.  Use the :command:`cmake_policy` command to set

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

Summary of changes:
 Help/policy/CMP0054.rst |   34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list