[Cmake-commits] CMake branch, master, updated. v3.13.0-rc1-115-ge5e59a1

Kitware Robot kwrobot at kitware.com
Tue Oct 16 11:05:04 EDT 2018


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, master has been updated
       via  e5e59a1bc68702395ff63e301cadaee266982fc7 (commit)
       via  73d9d53ed0333f76e8ded6a91d34fbc43111ab27 (commit)
       via  82a48226107e2ee0d073eaf521750c8354b67e41 (commit)
       via  60ca88d7261da8ad77e68d8f82ae67099af70df0 (commit)
      from  92f3ad7caebe6922a6b682cbb8c8d687cbfc8256 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5e59a1bc68702395ff63e301cadaee266982fc7
commit e5e59a1bc68702395ff63e301cadaee266982fc7
Merge: 73d9d53 82a4822
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 16 15:04:01 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Oct 16 11:04:09 2018 -0400

    Merge topic 'document-dollar-in-varnames'
    
    82a4822610 CMP0053: document that `$` is a valid literal variable character
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2479


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73d9d53ed0333f76e8ded6a91d34fbc43111ab27
commit 73d9d53ed0333f76e8ded6a91d34fbc43111ab27
Merge: 92f3ad7 60ca88d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 16 15:02:49 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Oct 16 11:02:58 2018 -0400

    Merge topic 'ctest_done_bug_fix'
    
    60ca88d726 ctest_submit: Generate Done.xml at submit time
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2477


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82a48226107e2ee0d073eaf521750c8354b67e41
commit 82a48226107e2ee0d073eaf521750c8354b67e41
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Oct 11 18:08:03 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 15 13:59:39 2018 -0400

    CMP0053: document that `$` is a valid literal variable character
    
    This was overlooked in the initial implementation of CMP0053. However,
    an additional policy to reject it again is not worth it. Instead, add
    tests and document the behavior.
    
    Fixes: #17883

diff --git a/Help/manual/cmake-language.7.rst b/Help/manual/cmake-language.7.rst
index 591f73d..71649ba 100644
--- a/Help/manual/cmake-language.7.rst
+++ b/Help/manual/cmake-language.7.rst
@@ -391,8 +391,9 @@ inside out, e.g. ``${outer_${inner_variable}_variable}``.
 
 Literal variable references may consist of alphanumeric characters,
 the characters ``/_.+-``, and `Escape Sequences`_.  Nested references
-may be used to evaluate variables of any name.  (See also policy
-:policy:`CMP0053` documentation for historical considerations.)
+may be used to evaluate variables of any name.  See also policy
+:policy:`CMP0053` documentation for historical considerations and reasons why
+the ``$`` is also technically permitted but is discouraged.
 
 The `Variables`_ section documents the scope of variable names
 and how their values are set.
diff --git a/Help/policy/CMP0053.rst b/Help/policy/CMP0053.rst
index 2620a60..032b3e5 100644
--- a/Help/policy/CMP0053.rst
+++ b/Help/policy/CMP0053.rst
@@ -16,6 +16,10 @@ cleaned up to simplify the behavior.  Specifically:
 * Literal ``${VAR}`` reference syntax may contain only
   alphanumeric characters (``A-Z``, ``a-z``, ``0-9``) and
   the characters ``_``, ``.``, ``/``, ``-``, and ``+``.
+  Note that ``$`` is technically allowed in the ``NEW`` behavior, but is
+  invalid for ``OLD`` behavior.  This is due to an oversight during the
+  implementation of :policy:`CMP0053` and its use as a literal variable
+  reference is discouraged for this reason.
   Variables with other characters in their name may still
   be referenced indirectly, e.g.
 
diff --git a/Tests/RunCMake/Syntax/CMP0053-Dollar-NEW-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-Dollar-NEW-stderr.txt
new file mode 100644
index 0000000..7f248ae
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-Dollar-NEW-stderr.txt
@@ -0,0 +1,2 @@
+^-->value<--
+-->value<--$
diff --git a/Tests/RunCMake/Syntax/CMP0053-Dollar-NEW.cmake b/Tests/RunCMake/Syntax/CMP0053-Dollar-NEW.cmake
new file mode 100644
index 0000000..b81fd56
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-Dollar-NEW.cmake
@@ -0,0 +1,6 @@
+cmake_policy(SET CMP0053 NEW)
+
+set($ value)
+set(dollar $)
+message("-->${${dollar}}<--")
+message("-->${$}<--")
diff --git a/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-result.txt b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-stderr.txt
new file mode 100644
index 0000000..aecd4d3
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-stderr.txt
@@ -0,0 +1,24 @@
+^CMake Deprecation Warning at CMP0053-Dollar-OLD.cmake:1 \(cmake_policy\):
+  The OLD behavior for policy CMP0053 will be removed from a future version
+  of CMake.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
++
+-->value<--
+CMake Error at CMP0053-Dollar-OLD.cmake:6 \(message\):
+  Syntax error in cmake code at
+
+    .*CMP0053-Dollar-OLD.cmake:6
+
+  when parsing string
+
+    -->\${\$}<--
+
+  syntax error, unexpected \$, expecting } \(7\)
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD.cmake b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD.cmake
new file mode 100644
index 0000000..647f464
--- /dev/null
+++ b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD.cmake
@@ -0,0 +1,6 @@
+cmake_policy(SET CMP0053 OLD)
+
+set($ value)
+set(dollar $)
+message("-->${${dollar}}<--")
+message("-->${$}<--")
diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
index a397620..8d74dc1 100644
--- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
@@ -111,6 +111,8 @@ run_cmake(CMP0053-NameWithNewlineQuoted)
 run_cmake(CMP0053-NameWithCarriageReturnQuoted)
 run_cmake(CMP0053-NameWithEscapedSpacesQuoted)
 run_cmake(CMP0053-NameWithEscapedTabsQuoted)
+run_cmake(CMP0053-Dollar-OLD)
+run_cmake(CMP0053-Dollar-NEW)
 
 # Variable special types
 run_cmake(QueryCache)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=60ca88d7261da8ad77e68d8f82ae67099af70df0
commit 60ca88d7261da8ad77e68d8f82ae67099af70df0
Author:     Zack Galbreath <zack.galbreath at kitware.com>
AuthorDate: Thu Oct 11 13:48:53 2018 -0400
Commit:     Zack Galbreath <zack.galbreath at kitware.com>
CommitDate: Mon Oct 15 13:03:34 2018 -0400

    ctest_submit: Generate Done.xml at submit time
    
    This fixes a bug where calling `ctest_submit()` would result in a Done.xml
    file with an empty <buildId> element.
    
    CDash responds with a buildId when CTest submits a file. For this reason,
    Done.xml needs to generated after CTest has submitted some other file to
    CDash. This change also has the benefit of making Done.xml's timestamp as
    late as possible, giving us a more accurate record of how long the entire
    build took to complete.

diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 6ad0e03..98872a5 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -467,6 +467,17 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
           cmSystemTools::ComputeFileHash(local_file, cmCryptoHash::AlgoMD5);
       }
 
+      // Generate Done.xml right before it is submitted.
+      // The reason for this is two-fold:
+      // 1) It must be generated after some other part has been submitted
+      //    so we have a buildId to refer to in its contents.
+      // 2) By generating Done.xml here its timestamp will be as late as
+      //    possible. This gives us a more accurate record of how long the
+      //    entire build took to complete.
+      if (file == "Done.xml") {
+        this->CTest->GenerateDoneFile();
+      }
+
       if (!cmSystemTools::FileExists(local_file)) {
         cmCTestLog(this->CTest, ERROR_MESSAGE,
                    "   Cannot find file: " << local_file << std::endl);
@@ -1420,7 +1431,6 @@ int cmCTestSubmitHandler::ProcessHandler()
 
   // Submit Done.xml last
   if (this->SubmitPart[cmCTest::PartDone]) {
-    this->CTest->GenerateDoneFile();
     files.push_back("Done.xml");
   }
 

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

Summary of changes:
 Help/manual/cmake-language.7.rst                        |  5 +++--
 Help/policy/CMP0053.rst                                 |  4 ++++
 Source/CTest/cmCTestSubmitHandler.cxx                   | 12 +++++++++++-
 Tests/RunCMake/Syntax/CMP0053-Dollar-NEW-stderr.txt     |  2 ++
 Tests/RunCMake/Syntax/CMP0053-Dollar-NEW.cmake          |  6 ++++++
 .../CMP0053-Dollar-OLD-result.txt}                      |  0
 .../CMP0053-Dollar-OLD-stderr.txt}                      | 17 ++++++++++++++---
 Tests/RunCMake/Syntax/CMP0053-Dollar-OLD.cmake          |  6 ++++++
 Tests/RunCMake/Syntax/RunCMakeTest.cmake                |  2 ++
 9 files changed, 48 insertions(+), 6 deletions(-)
 create mode 100644 Tests/RunCMake/Syntax/CMP0053-Dollar-NEW-stderr.txt
 create mode 100644 Tests/RunCMake/Syntax/CMP0053-Dollar-NEW.cmake
 copy Tests/RunCMake/{while/MissingArgument-result.txt => Syntax/CMP0053-Dollar-OLD-result.txt} (100%)
 copy Tests/RunCMake/{CMP0053/CMP0053-OLD-stderr.txt => Syntax/CMP0053-Dollar-OLD-stderr.txt} (54%)
 create mode 100644 Tests/RunCMake/Syntax/CMP0053-Dollar-OLD.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list