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 3402e60764e6dbb3626305a5a36a2d0ab4d1881d (commit) via 56d3161648b29d1a6c3c095891fe7fc7f9323200 (commit) via e8f113d51543ad440e2c3e915f2523ce10b93195 (commit) via 425e34bac2a69388bf78156ec828522d5fb79fb1 (commit) from b675e4f48b29b811c7f2a7e0ca603b4a4b428bef (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=3402e60764e6dbb3626305a5a36a2d0ab4d1881d commit 3402e60764e6dbb3626305a5a36a2d0ab4d1881d Merge: b675e4f 56d3161 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu May 1 10:37:31 2014 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu May 1 10:37:31 2014 -0400 Merge topic 'dev/faster-evis' into next 56d31616 CMP0053: Fix RunCMake.Syntax test for new policy summary e8f113d5 CMP0053: Revise documentation of this policy 425e34ba Help: Add more reference targets to cmake-language.7 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=56d3161648b29d1a6c3c095891fe7fc7f9323200 commit 56d3161648b29d1a6c3c095891fe7fc7f9323200 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu May 1 10:23:05 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu May 1 10:38:02 2014 -0400 CMP0053: Fix RunCMake.Syntax test for new policy summary diff --git a/Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt index 718af8b..48b6a24 100644 --- a/Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt +++ b/Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt @@ -1,7 +1,7 @@ ^CMake Warning \(dev\) at CMP0053-At-WARN.cmake:4 \(set\): - Policy CMP0053 is not set: Use the new variable expansion rules. Run - "cmake --help-policy CMP0053" for policy details. Use the cmake_policy - command to set the policy and suppress this warning. + Policy CMP0053 is not set: Simplify variable reference and escape sequence + evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. Input: '@var@' Old expansion: '\${right}' diff --git a/Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt index 8a4bf46..3443603 100644 --- a/Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt +++ b/Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt @@ -1,7 +1,7 @@ ^CMake Warning \(dev\) at CMP0053-WARN.cmake:2 \(message\): - Policy CMP0053 is not set: Use the new variable expansion rules. Run - "cmake --help-policy CMP0053" for policy details. Use the cmake_policy - command to set the policy and suppress this warning. + Policy CMP0053 is not set: Simplify variable reference and escape sequence + evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. Input: '\\' Old behavior is accepted and the new behavior causes an error: 'Syntax error in cmake code at http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8f113d51543ad440e2c3e915f2523ce10b93195 commit e8f113d51543ad440e2c3e915f2523ce10b93195 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu May 1 10:21:23 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu May 1 10:38:02 2014 -0400 CMP0053: Revise documentation of this policy diff --git a/Help/policy/CMP0010.rst b/Help/policy/CMP0010.rst index 4f0c8e5..9d2eb76 100644 --- a/Help/policy/CMP0010.rst +++ b/Help/policy/CMP0010.rst @@ -10,8 +10,8 @@ variable reference is an error. The OLD behavior for this policy is to warn about the error, leave the string untouched, and continue. The NEW behavior for this policy is to report an error. -If :policy:`CMP0053` is used, this policy has no effect and is treated as -always being NEW. +If :policy:`CMP0053` is set to ``NEW``, this policy has no effect +and is treated as always being ``NEW``. This policy was introduced in CMake version 2.6.3. CMake version |release| warns when the policy is not set and uses OLD behavior. Use diff --git a/Help/policy/CMP0053.rst b/Help/policy/CMP0053.rst index 820eb9e..ba7ebd3 100644 --- a/Help/policy/CMP0053.rst +++ b/Help/policy/CMP0053.rst @@ -1,26 +1,38 @@ CMP0053 ------- -Use new variable expansion rules. +Simplify variable reference and escape sequence evaluation. -CMake 3.0 and lower used an older, slower implementation of variable expansion -which offered some behavior no longer allowed by the new parser. Specifically, -'@' expansion is no longer performed in files not configured using -:command:`configure_file` or the CONFIGURE signature of :command:`string` and -literal variable names are restricted to alphanumerics and the characters -"./-+" and in environment variables "()" are also allowed. If variables with -other characters are required, use +CMake 3.1 introduced a much faster implementation of evaluation of the +:ref:`Variable References` and :ref:`Escape Sequences` documented in the +:manual:`cmake-language(7)` manual. While the behavior is identical +to the legacy implementation in most cases, some corner cases were +cleaned up to simplify the behavior. Specifically: -.. code-block:: cmake +* Expansion of ``@VAR@`` reference syntax defined by the + :command:`configure_file` and :command:`string(CONFIGURE)` + commands is no longer performed in other contexts. - set(varname "disallowschars&") - message("${${varname}}") +* Literal ``${VAR}`` reference syntax may contain only + alphanumeric characters (``A-Z``, ``a-z``, ``0-9``) and + the characters ``_``, ``.``, ``/``, ``-``, and ``+``. + Literal ``$ENV{VAR}`` reference syntax may also use + ``(`` and ``)``. Variables with other characters in + their name may still be referenced indirectly, e.g. -This policy also enforces :policy:`CMP0010` unconditionally. + .. code-block:: cmake -The OLD behavior for this policy is to use the old variable expansion parser. -The NEW behavior is to use the new variable expansion rules. + set(varname "otherwise & disallowed $ characters") + message("${${varname}}") -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 cmake_policy -command to set it to OLD or NEW explicitly. +* The setting of policy :policy:`CMP0010` is not considered + so bad variable reference syntax is always an error. + +The ``OLD`` behavior for this policy is to honor the legacy behavior for +variable references and escape sequences. The ``NEW`` behavior is to +use the simpler variable expansion and escape sequence evaluation rules. + +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 +it to ``OLD`` or ``NEW`` explicitly. diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 94c783c..693945d 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -357,7 +357,7 @@ cmPolicies::cmPolicies() this->DefinePolicy( CMP0053, "CMP0053", - "Use the new variable expansion rules.", + "Simplify variable reference and escape sequence evaluation.", 3,1,0, cmPolicies::WARN); } diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index e5c82f8..5d69d14 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -108,7 +108,7 @@ public: CMP0052, ///< Reject source and build dirs in installed /// INTERFACE_INCLUDE_DIRECTORIES - CMP0053, ///< Use the new EVIS parser and rules + CMP0053, ///< Simplify variable reference and escape sequence evaluation /** \brief Always the last entry. * http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=425e34bac2a69388bf78156ec828522d5fb79fb1 commit 425e34bac2a69388bf78156ec828522d5fb79fb1 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu May 1 10:18:03 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu May 1 10:18:03 2014 -0400 Help: Add more reference targets to cmake-language.7 diff --git a/Help/manual/cmake-language.7.rst b/Help/manual/cmake-language.7.rst index 1e4c6c5..5bbe16e 100644 --- a/Help/manual/cmake-language.7.rst +++ b/Help/manual/cmake-language.7.rst @@ -287,6 +287,8 @@ For example: Instead use a `Quoted Argument`_ or a `Bracket Argument`_ to represent the content. +.. _`Escape Sequences`: + Escape Sequences ---------------- @@ -305,6 +307,8 @@ encodes a tab, carriage return, or newline character, respectively. A ``\;`` encodes itself but may be used in an `Unquoted Argument`_ to encode the ``;`` without dividing the argument value on it. +.. _`Variable References`: + Variable References ------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-language.7.rst | 4 ++ Help/policy/CMP0010.rst | 4 +- Help/policy/CMP0053.rst | 46 ++++++++++++++-------- Source/cmPolicies.cxx | 2 +- Source/cmPolicies.h | 2 +- Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt | 6 +-- Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt | 6 +-- 7 files changed, 43 insertions(+), 27 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits