[Cmake-commits] CMake branch, master, updated. v3.14.0-rc1-89-g49a53ca

Kitware Robot kwrobot at kitware.com
Thu Feb 14 10:13:04 EST 2019


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  49a53cac87fe3a303a2794ccdd7c1b5cecd2d016 (commit)
       via  ec13bd523006151b4e0d2b9afc19562e5f05de38 (commit)
       via  ded4bc136e5b120b2d047dc9b8eb6f7446043d08 (commit)
       via  f3999a21c85e6caf19feef7c90afce3969d9102a (commit)
      from  5b3683ec8a23d8cecb27f3cd2e3a649ae6ad5999 (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=49a53cac87fe3a303a2794ccdd7c1b5cecd2d016
commit 49a53cac87fe3a303a2794ccdd7c1b5cecd2d016
Merge: 5b3683e ec13bd5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Feb 14 15:11:40 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Feb 14 10:11:54 2019 -0500

    Merge topic 'update-kwsys'
    
    ec13bd5230 Tests: Disable test that builds KWSys if not also building CMake
    ded4bc136e Merge branch 'upstream-KWSys' into update-kwsys
    f3999a21c8 KWSys 2019-02-12 (44676809)
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2953


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec13bd523006151b4e0d2b9afc19562e5f05de38
commit ec13bd523006151b4e0d2b9afc19562e5f05de38
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Feb 13 08:07:54 2019 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Feb 13 08:10:35 2019 -0500

    Tests: Disable test that builds KWSys if not also building CMake
    
    If `CMake_TEST_EXTERNAL_CMAKE` is enabled then the compiler with which
    we are driving tests may not be able to compile CMake, so do not try
    to compile KWSys with it either.

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 40e53a2..3245f3e 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -3272,12 +3272,14 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
       --output-log "${CMake_BINARY_DIR}/Tests/CTestTest/testOutput.log"
       )
 
-    configure_file("${CMake_SOURCE_DIR}/Tests/CTestTest2/test.cmake.in"
-      "${CMake_BINARY_DIR}/Tests/CTestTest2/test.cmake" @ONLY ESCAPE_QUOTES)
-    add_test(CTestTest2 ${CMAKE_CTEST_COMMAND}
-      -S "${CMake_BINARY_DIR}/Tests/CTestTest2/test.cmake" -V
-      --output-log "${CMake_BINARY_DIR}/Tests/CTestTest2/testOutput.log"
-      )
+    if(NOT CMake_TEST_EXTERNAL_CMAKE)
+      configure_file("${CMake_SOURCE_DIR}/Tests/CTestTest2/test.cmake.in"
+        "${CMake_BINARY_DIR}/Tests/CTestTest2/test.cmake" @ONLY ESCAPE_QUOTES)
+      add_test(CTestTest2 ${CMAKE_CTEST_COMMAND}
+        -S "${CMake_BINARY_DIR}/Tests/CTestTest2/test.cmake" -V
+        --output-log "${CMake_BINARY_DIR}/Tests/CTestTest2/testOutput.log"
+        )
+    endif()
 
     if("${CMAKE_GENERATOR}" MATCHES "Makefiles" OR "${CMAKE_GENERATOR}" MATCHES "Ninja")
       configure_file("${CMake_SOURCE_DIR}/Tests/CTestTestLaunchers/test.cmake.in"
@@ -3309,11 +3311,13 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
         PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT})
     endif ()
 
-    get_test_property(CTestTest2 TIMEOUT PREVIOUS_TIMEOUT)
-    if ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
-      set_tests_properties ( CTestTest2
-        PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT})
-    endif ()
+    if(NOT CMake_TEST_EXTERNAL_CMAKE)
+      get_test_property(CTestTest2 TIMEOUT PREVIOUS_TIMEOUT)
+      if("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
+        set_tests_properties ( CTestTest2
+          PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT})
+      endif()
+    endif()
   endif ()
 
   if(CMake_TEST_EXTERNAL_CMAKE)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ded4bc136e5b120b2d047dc9b8eb6f7446043d08
commit ded4bc136e5b120b2d047dc9b8eb6f7446043d08
Merge: 9d2ab63 f3999a2
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Feb 12 08:35:12 2019 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Feb 12 08:35:12 2019 -0500

    Merge branch 'upstream-KWSys' into update-kwsys
    
    * upstream-KWSys:
      KWSys 2019-02-12 (44676809)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f3999a21c85e6caf19feef7c90afce3969d9102a
commit f3999a21c85e6caf19feef7c90afce3969d9102a
Author:     KWSys Upstream <kwrobot at kitware.com>
AuthorDate: Tue Feb 12 08:34:34 2019 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Feb 12 08:35:11 2019 -0500

    KWSys 2019-02-12 (44676809)
    
    Code extracted from:
    
        https://gitlab.kitware.com/utils/kwsys.git
    
    at commit 4467680959f82b755462a8530ef5d0dbd928d2d4 (master).
    
    Upstream Shortlog
    -----------------
    
    Albert Astals Cid (1):
          7d50c26d Delete some default constructors and assignment operators
    
    Artur Ryt (1):
          01089e4c Prefer back/data over dereferencing rbegin/begin iterator

diff --git a/CommandLineArguments.hxx.in b/CommandLineArguments.hxx.in
index 31115e5..7db9015 100644
--- a/CommandLineArguments.hxx.in
+++ b/CommandLineArguments.hxx.in
@@ -62,6 +62,9 @@ public:
   CommandLineArguments();
   ~CommandLineArguments();
 
+  CommandLineArguments(const CommandLineArguments&) = delete;
+  CommandLineArguments& operator=(const CommandLineArguments&) = delete;
+
   /**
    * Various argument types.
    */
diff --git a/Directory.cxx b/Directory.cxx
index 31b1c15..59530a4 100644
--- a/Directory.cxx
+++ b/Directory.cxx
@@ -102,7 +102,7 @@ bool Directory::Load(const std::string& name)
 #  endif
   char* buf;
   size_t n = name.size();
-  if (*name.rbegin() == '/' || *name.rbegin() == '\\') {
+  if (name.back() == '/' || name.back() == '\\') {
     buf = new char[n + 1 + 1];
     sprintf(buf, "%s*", name.c_str());
   } else {
@@ -144,7 +144,7 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name)
 #  endif
   char* buf;
   size_t n = name.size();
-  if (*name.rbegin() == '/') {
+  if (name.back() == '/') {
     buf = new char[n + 1 + 1];
     sprintf(buf, "%s*", name.c_str());
   } else {
diff --git a/Glob.cxx b/Glob.cxx
index 6952d24..829c138 100644
--- a/Glob.cxx
+++ b/Glob.cxx
@@ -263,7 +263,7 @@ bool Glob::RecurseDirectory(std::string::size_type start,
       }
     } else {
       if (!this->Internals->Expressions.empty() &&
-          this->Internals->Expressions.rbegin()->find(fname)) {
+          this->Internals->Expressions.back().find(fname)) {
         this->AddFile(this->Internals->Files, realname);
       }
     }
diff --git a/SystemInformation.cxx b/SystemInformation.cxx
index f323efc..4354753 100644
--- a/SystemInformation.cxx
+++ b/SystemInformation.cxx
@@ -4620,7 +4620,7 @@ std::string SystemInformationImplementation::RunProcess(
 
   // Run the application
   kwsysProcess* gp = kwsysProcess_New();
-  kwsysProcess_SetCommand(gp, &*args.begin());
+  kwsysProcess_SetCommand(gp, args.data());
   kwsysProcess_SetOption(gp, kwsysProcess_Option_HideWindow, 1);
 
   kwsysProcess_Execute(gp);
diff --git a/SystemInformation.hxx.in b/SystemInformation.hxx.in
index 9e1ce6c..5e93878 100644
--- a/SystemInformation.hxx.in
+++ b/SystemInformation.hxx.in
@@ -56,6 +56,9 @@ public:
   SystemInformation();
   ~SystemInformation();
 
+  SystemInformation(const SystemInformation&) = delete;
+  SystemInformation& operator=(const SystemInformation&) = delete;
+
   const char* GetVendorString();
   const char* GetVendorID();
   std::string GetTypeID();
diff --git a/SystemTools.cxx b/SystemTools.cxx
index cbdfe11..33a92e4 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -416,6 +416,9 @@ public:
     {
     }
     ~Free() { free(const_cast<envchar*>(this->Env)); }
+
+    Free(const Free&) = delete;
+    Free& operator=(const Free&) = delete;
   };
 
   const envchar* Release(const envchar* env)
@@ -473,7 +476,7 @@ void SystemTools::GetPath(std::vector<std::string>& path, const char* env)
   }
 
   // A hack to make the below algorithm work.
-  if (!pathEnv.empty() && *pathEnv.rbegin() != pathSep) {
+  if (!pathEnv.empty() && pathEnv.back() != pathSep) {
     pathEnv += pathSep;
   }
   std::string::size_type start = 0;
@@ -1943,7 +1946,7 @@ void SystemTools::ConvertToUnixSlashes(std::string& path)
   // a single /
   pathCString = path.c_str();
   size_t size = path.size();
-  if (size > 1 && *path.rbegin() == '/') {
+  if (size > 1 && path.back() == '/') {
     // if it is c:/ then do not remove the trailing slash
     if (!((size == 3 && pathCString[1] == ':'))) {
       path.resize(size - 1);
@@ -2692,7 +2695,7 @@ std::string SystemTools::FindName(const std::string& name,
     for (std::vector<std::string>::iterator i = path.begin(); i != path.end();
          ++i) {
       std::string& p = *i;
-      if (p.empty() || *p.rbegin() != '/') {
+      if (p.empty() || p.back() != '/') {
         p += "/";
       }
     }
@@ -2810,7 +2813,7 @@ std::string SystemTools::FindProgram(const std::string& name,
     for (std::vector<std::string>::iterator i = path.begin(); i != path.end();
          ++i) {
       std::string& p = *i;
-      if (p.empty() || *p.rbegin() != '/') {
+      if (p.empty() || p.back() != '/') {
         p += "/";
       }
     }
@@ -2888,7 +2891,7 @@ std::string SystemTools::FindLibrary(const std::string& name,
     for (std::vector<std::string>::iterator i = path.begin(); i != path.end();
          ++i) {
       std::string& p = *i;
-      if (p.empty() || *p.rbegin() != '/') {
+      if (p.empty() || p.back() != '/') {
         p += "/";
       }
     }
@@ -3234,10 +3237,10 @@ void SystemTools::AddTranslationPath(const std::string& a,
     if (SystemTools::FileIsFullPath(path_b) &&
         path_b.find("..") == std::string::npos) {
       // Before inserting make sure path ends with '/'
-      if (!path_a.empty() && *path_a.rbegin() != '/') {
+      if (!path_a.empty() && path_a.back() != '/') {
         path_a += '/';
       }
-      if (!path_b.empty() && *path_b.rbegin() != '/') {
+      if (!path_b.empty() && path_b.back() != '/') {
         path_b += '/';
       }
       if (!(path_a == path_b)) {
@@ -3446,7 +3449,7 @@ std::string SystemTools::RelativePath(const std::string& local,
   // between each entry that does not already have one
   for (std::vector<std::string>::iterator vit1 = finalPath.begin();
        vit1 != finalPath.end(); ++vit1) {
-    if (!relativePath.empty() && *relativePath.rbegin() != '/') {
+    if (!relativePath.empty() && relativePath.back() != '/') {
       relativePath += "/";
     }
     relativePath += *vit1;
@@ -3648,7 +3651,7 @@ void SystemTools::SplitPath(const std::string& p,
       }
 #endif
       if (!homedir.empty() &&
-          (*homedir.rbegin() == '/' || *homedir.rbegin() == '\\')) {
+          (homedir.back() == '/' || homedir.back() == '\\')) {
         homedir.resize(homedir.size() - 1);
       }
       SystemTools::SplitPath(homedir, components);
@@ -4016,7 +4019,7 @@ bool SystemTools::LocateFileInDir(const char* filename, const char* dir,
         filename_dir = SystemTools::GetFilenamePath(filename_dir);
         filename_dir_base = SystemTools::GetFilenameName(filename_dir);
 #if defined(_WIN32)
-        if (filename_dir_base.empty() || *filename_dir_base.rbegin() == ':')
+        if (filename_dir_base.empty() || filename_dir_base.back() == ':')
 #else
         if (filename_dir_base.empty())
 #endif
@@ -4092,7 +4095,7 @@ bool SystemTools::GetShortPath(const std::string& path, std::string& shortPath)
   std::string tempPath = path; // create a buffer
 
   // if the path passed in has quotes around it, first remove the quotes
-  if (!path.empty() && path[0] == '"' && *path.rbegin() == '"') {
+  if (!path.empty() && path[0] == '"' && path.back() == '"') {
     tempPath = path.substr(1, path.length() - 2);
   }
 
@@ -4169,7 +4172,7 @@ bool SystemTools::GetLineFromStream(std::istream& is, std::string& line,
   bool haveData = !line.empty() || !is.eof();
   if (!line.empty()) {
     // Avoid storing a carriage return character.
-    if (*line.rbegin() == '\r') {
+    if (line.back() == '\r') {
       line.resize(line.size() - 1);
     }
 
@@ -4307,7 +4310,7 @@ bool SystemTools::IsSubDirectory(const std::string& cSubdir,
   if (subdir.size() <= dir.size() || dir.empty()) {
     return false;
   }
-  bool isRootPath = *dir.rbegin() == '/'; // like "/" or "C:/"
+  bool isRootPath = dir.back() == '/'; // like "/" or "C:/"
   size_t expectedSlashPosition = isRootPath ? dir.size() - 1u : dir.size();
   if (subdir[expectedSlashPosition] != '/') {
     return false;
diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in
index 1967860..33b579f 100644
--- a/SystemTools.hxx.in
+++ b/SystemTools.hxx.in
@@ -54,6 +54,9 @@ class @KWSYS_NAMESPACE at _EXPORT SystemToolsManager
 public:
   SystemToolsManager();
   ~SystemToolsManager();
+
+  SystemToolsManager(const SystemToolsManager&) = delete;
+  SystemToolsManager& operator=(const SystemToolsManager&) = delete;
 };
 
 // This instance will show up in any translation unit that uses

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

Summary of changes:
 Source/kwsys/CommandLineArguments.hxx.in |  3 +++
 Source/kwsys/Directory.cxx               |  4 ++--
 Source/kwsys/Glob.cxx                    |  2 +-
 Source/kwsys/SystemInformation.cxx       |  2 +-
 Source/kwsys/SystemInformation.hxx.in    |  3 +++
 Source/kwsys/SystemTools.cxx             | 29 ++++++++++++++++-------------
 Source/kwsys/SystemTools.hxx.in          |  3 +++
 Tests/CMakeLists.txt                     | 26 +++++++++++++++-----------
 8 files changed, 44 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list