[Cmake-commits] CMake branch, master, updated. v3.9.2-764-g28adf38

Kitware Robot kwrobot at kitware.com
Mon Sep 11 07:55:20 EDT 2017


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  28adf3833c23411dfce12b5be754ad53bc2b9b05 (commit)
       via  bf19bb5609b409c9c4043b22a7bbdb38354af73a (commit)
       via  15b26ace186f08625337d59328ce5d7190cd5384 (commit)
       via  e8463e3570eaca13e4ee61fcec55b609602cbcea (commit)
       via  b2242ea9641cd09d94aaf77a33345100cc3a3def (commit)
       via  5b829c89b8cdb5b8f908dcd4849a37a183b0971c (commit)
       via  a6e32eb0c26277c71c586aba457df5daaf2a71ba (commit)
       via  f34ac1c69b3ab0f6e3565c1c9ff7ebbd69bcab9a (commit)
       via  014ad2989cb145586d6d32d90710a70fb9a23ad9 (commit)
       via  9ed242807893becd4cd8245248fade93f7054c71 (commit)
       via  34c4108bbcb8774821ac857e0ad0a92294ee8b0b (commit)
      from  00975e926199eea21763470e2ab876246e36669a (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=28adf3833c23411dfce12b5be754ad53bc2b9b05
commit 28adf3833c23411dfce12b5be754ad53bc2b9b05
Merge: bf19bb5 9ed2428
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 11 11:53:00 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Sep 11 07:53:18 2017 -0400

    Merge topic 'vs_improve_custom_command'
    
    9ed24280 VS: only add custom command line if it is not empty
    34c4108b add HasOnlyEmptyCommandLines() method to cmCustomCommandGenerator
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1050


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf19bb5609b409c9c4043b22a7bbdb38354af73a
commit bf19bb5609b409c9c4043b22a7bbdb38354af73a
Merge: 15b26ac 014ad29
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 11 11:49:32 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Sep 11 07:49:40 2017 -0400

    Merge topic 'timestamp'
    
    014ad298 Timestamp: support %A and %B
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1228


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15b26ace186f08625337d59328ce5d7190cd5384
commit 15b26ace186f08625337d59328ce5d7190cd5384
Merge: e8463e3 b2242ea
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 11 11:48:38 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Sep 11 07:48:46 2017 -0400

    Merge topic 'show_weighted_times'
    
    b2242ea9 Help: Update documentation for PROCESSORS test property
    5b829c89 CTest: Weight reported test times by PROCESSORS in summaries
    a6e32eb0 CTest: Split out labels and subproject labels in summary output
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1226


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8463e3570eaca13e4ee61fcec55b609602cbcea
commit e8463e3570eaca13e4ee61fcec55b609602cbcea
Merge: 00975e9 f34ac1c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 11 11:47:23 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Sep 11 07:47:31 2017 -0400

    Merge topic 'findmatlab-remove-CMAKE_CL_64'
    
    f34ac1c6 FindMatlab: Don't use the deprecated variable CMAKE_CL_64
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1234


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2242ea9641cd09d94aaf77a33345100cc3a3def
commit b2242ea9641cd09d94aaf77a33345100cc3a3def
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Wed Sep 6 13:51:12 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 8 10:03:53 2017 -0400

    Help: Update documentation for PROCESSORS test property
    
    This updates the documentation for the PROCESSORS test property to show
    how it will affect the summary output for labels and sub projects.

diff --git a/Help/prop_test/PROCESSORS.rst b/Help/prop_test/PROCESSORS.rst
index 763b6d0..a1211fb 100644
--- a/Help/prop_test/PROCESSORS.rst
+++ b/Help/prop_test/PROCESSORS.rst
@@ -1,8 +1,13 @@
 PROCESSORS
 ----------
 
-How many process slots this test requires
+Set to specify how many process slots this test requires.
 
 Denotes the number of processors that this test will require.  This is
 typically used for MPI tests, and should be used in conjunction with
-the ctest_test PARALLEL_LEVEL option.
+the :command:`ctest_test` ``PARALLEL_LEVEL`` option.
+
+This will also be used to display a weighted test timing result in label and
+subproject summaries in the command line output of :manual:`ctest(1)`. The wall
+clock time for the test run will be multiplied by this property to give a
+better idea of how much cpu resource CTest allocated for the test.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5b829c89b8cdb5b8f908dcd4849a37a183b0971c
commit 5b829c89b8cdb5b8f908dcd4849a37a183b0971c
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Wed Sep 6 12:07:08 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 8 10:03:01 2017 -0400

    CTest: Weight reported test times by PROCESSORS in summaries
    
    This commit changes the times reported by labels and subprojects to be
    weighted by the PROCESSORS property. It is reported with `sec*proc`
    instead of just `sec`.

diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 24c1857..9962c49 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -664,7 +664,7 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject)
          l != p.Labels.end(); ++l) {
       // only use labels found in labels
       if (labels.find(*l) != labels.end()) {
-        labelTimes[*l] += result.ExecutionTime;
+        labelTimes[*l] += result.ExecutionTime * result.Properties->Processors;
         ++labelCounts[*l];
       }
     }
@@ -687,7 +687,7 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject)
     label.resize(maxlen + 3, ' ');
 
     char buf[1024];
-    sprintf(buf, "%6.2f sec", labelTimes[*i]);
+    sprintf(buf, "%6.2f sec*proc", labelTimes[*i]);
 
     std::ostringstream labelCountStr;
     labelCountStr << "(" << labelCounts[*i] << " test";
diff --git a/Tests/RunCMake/CTestCommandLine/LabelCount-stdout.txt b/Tests/RunCMake/CTestCommandLine/LabelCount-stdout.txt
index 7fe04eb..9cfe41c 100644
--- a/Tests/RunCMake/CTestCommandLine/LabelCount-stdout.txt
+++ b/Tests/RunCMake/CTestCommandLine/LabelCount-stdout.txt
@@ -1,7 +1,7 @@
 100% tests passed, 0 tests failed out of 4
 +
 +Label Time Summary:
-+'bar'    = +[0-9.]+ sec \(3 tests\)
-+'foo'    = +[0-9.]+ sec \(1 test\)
++'bar'    = +[0-9.]+ sec\*proc \(3 tests\)
++'foo'    = +[0-9.]+ sec\*proc \(1 test\)
 +
 Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-stdout.txt
index e3be144..05b484d 100644
--- a/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-stdout.txt
+++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-stdout.txt
@@ -1,10 +1,10 @@
 17% tests passed, 5 tests failed out of 6
 +
 Subproject Time Summary:
-MyExperimentalFeature += +[0-9.]+ sec \(5 tests\)
-MyProductionCode += +[0-9.]+ sec \(1 test\)
+MyExperimentalFeature += +[0-9.]+ sec\*proc \(5 tests\)
+MyProductionCode += +[0-9.]+ sec\*proc \(1 test\)
 +
 Label Time Summary:
-NotASubproject += +[0-9.]+ sec \(6 tests\)
+NotASubproject += +[0-9.]+ sec\*proc \(6 tests\)
 +
 Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-stdout.txt
index e3be144..05b484d 100644
--- a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-stdout.txt
+++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-stdout.txt
@@ -1,10 +1,10 @@
 17% tests passed, 5 tests failed out of 6
 +
 Subproject Time Summary:
-MyExperimentalFeature += +[0-9.]+ sec \(5 tests\)
-MyProductionCode += +[0-9.]+ sec \(1 test\)
+MyExperimentalFeature += +[0-9.]+ sec\*proc \(5 tests\)
+MyProductionCode += +[0-9.]+ sec\*proc \(1 test\)
 +
 Label Time Summary:
-NotASubproject += +[0-9.]+ sec \(6 tests\)
+NotASubproject += +[0-9.]+ sec\*proc \(6 tests\)
 +
 Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stdout.txt
index 20c6c86..c2c1bc7 100644
--- a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stdout.txt
+++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stdout.txt
@@ -1,9 +1,9 @@
 0% tests passed, 1 tests failed out of 1
 +
 Subproject Time Summary:
-MyThirdPartyDependency += +[0-9.]+ sec \(1 test\)
+MyThirdPartyDependency += +[0-9.]+ sec\*proc \(1 test\)
 +
 Label Time Summary:
-NotASubproject += +[0-9.]+ sec \(1 test\)
+NotASubproject += +[0-9.]+ sec\*proc \(1 test\)
 +
 Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-stdout.txt
index b5d76a9..3567a92 100644
--- a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-stdout.txt
+++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-stdout.txt
@@ -1,6 +1,6 @@
 50% tests passed, 1 tests failed out of 2
 +
 Subproject Time Summary:
-MySubproject += +[0-9.]+ sec \(2 tests\)
+MySubproject += +[0-9.]+ sec\*proc \(2 tests\)
 +
 Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stdout.txt
index bec6b14..3a71022 100644
--- a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stdout.txt
+++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stdout.txt
@@ -1,9 +1,9 @@
 67% tests passed, 1 tests failed out of 3
 +
 Subproject Time Summary:
-MySubproject += +[0-9.]+ sec \(2 tests\)
+MySubproject += +[0-9.]+ sec\*proc \(2 tests\)
 +
 Label Time Summary:
-NotASubproject += +[0-9.]+ sec \(1 test\)
+NotASubproject += +[0-9.]+ sec\*proc \(1 test\)
 +
 Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stdout.txt
index 1ac5530..1146bfe 100644
--- a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stdout.txt
+++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stdout.txt
@@ -1,6 +1,6 @@
 67% tests passed, 1 tests failed out of 3
 +
 Label Time Summary:
-NotASubproject += +[0-9.]+ sec \(1 test\)
+NotASubproject += +[0-9.]+ sec\*proc \(1 test\)
 +
 Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-stdout.txt
index b5d76a9..3567a92 100644
--- a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-stdout.txt
+++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-stdout.txt
@@ -1,6 +1,6 @@
 50% tests passed, 1 tests failed out of 2
 +
 Subproject Time Summary:
-MySubproject += +[0-9.]+ sec \(2 tests\)
+MySubproject += +[0-9.]+ sec\*proc \(2 tests\)
 +
 Total Test time \(real\) = +[0-9.]+ sec

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6e32eb0c26277c71c586aba457df5daaf2a71ba
commit a6e32eb0c26277c71c586aba457df5daaf2a71ba
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Wed Sep 6 12:03:40 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 8 10:02:39 2017 -0400

    CTest: Split out labels and subproject labels in summary output
    
    This commit splits out the reporting of labels and labels used for sub
    projects. If a label is a sub project label it will not be included in
    the label summary.  To implement this the commit creates
    PrintLabelOrSubprojectSummary which is able to do the work of both
    PrintLabelSummary and PrintSubprojectSummary avoiding code duplication.

diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 18d9346..24c1857 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -535,14 +535,13 @@ int cmCTestTestHandler::ProcessHandler()
                  << static_cast<int>(percent + .5f) << "% tests passed, "
                  << failed.size() << " tests failed out of " << total
                  << std::endl);
-
-    if (!this->CTest->GetLabelsForSubprojects().empty() &&
-        this->CTest->GetSubprojectSummary()) {
-      this->PrintSubprojectSummary();
-    } else if (this->CTest->GetLabelSummary()) {
-      this->PrintLabelSummary();
+    if ((!this->CTest->GetLabelsForSubprojects().empty() &&
+         this->CTest->GetSubprojectSummary())) {
+      this->PrintLabelOrSubprojectSummary(true);
+    }
+    if (this->CTest->GetLabelSummary()) {
+      this->PrintLabelOrSubprojectSummary(false);
     }
-
     char realBuf[1024];
     sprintf(realBuf, "%6.2f sec", clock_finish - clock_start);
     cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
@@ -620,96 +619,32 @@ int cmCTestTestHandler::ProcessHandler()
   return 0;
 }
 
-void cmCTestTestHandler::PrintLabelSummary()
-{
-  cmCTestTestHandler::ListOfTests::iterator it = this->TestList.begin();
-  std::map<std::string, double> labelTimes;
-  std::map<std::string, int> labelCounts;
-  std::set<std::string> labels;
-  // initialize maps
-  std::string::size_type maxlen = 0;
-  for (; it != this->TestList.end(); ++it) {
-    cmCTestTestProperties& p = *it;
-    if (!p.Labels.empty()) {
-      for (std::vector<std::string>::iterator l = p.Labels.begin();
-           l != p.Labels.end(); ++l) {
-        if ((*l).size() > maxlen) {
-          maxlen = (*l).size();
-        }
-        labels.insert(*l);
-        labelTimes[*l] = 0;
-        labelCounts[*l] = 0;
-      }
-    }
-  }
-  cmCTestTestHandler::TestResultsVector::iterator ri =
-    this->TestResults.begin();
-  // fill maps
-  for (; ri != this->TestResults.end(); ++ri) {
-    cmCTestTestResult& result = *ri;
-    cmCTestTestProperties& p = *result.Properties;
-    if (!p.Labels.empty()) {
-      for (std::vector<std::string>::iterator l = p.Labels.begin();
-           l != p.Labels.end(); ++l) {
-        labelTimes[*l] += result.ExecutionTime;
-        ++labelCounts[*l];
-      }
-    }
-  }
-  // now print times
-  if (!labels.empty()) {
-    cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\nLabel Time Summary:",
-                       this->Quiet);
-  }
-  for (std::set<std::string>::const_iterator i = labels.begin();
-       i != labels.end(); ++i) {
-    std::string label = *i;
-    label.resize(maxlen + 3, ' ');
-
-    char buf[1024];
-    sprintf(buf, "%6.2f sec", labelTimes[*i]);
-
-    std::ostringstream labelCountStr;
-    labelCountStr << "(" << labelCounts[*i] << " test";
-    if (labelCounts[*i] > 1) {
-      labelCountStr << "s";
-    }
-    labelCountStr << ")";
-
-    cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\n"
-                         << label << " = " << buf << " "
-                         << labelCountStr.str(),
-                       this->Quiet);
-    if (this->LogFile) {
-      *this->LogFile << "\n" << *i << " = " << buf << "\n";
-    }
-  }
-  if (!labels.empty()) {
-    if (this->LogFile) {
-      *this->LogFile << "\n";
-    }
-    cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\n", this->Quiet);
-  }
-}
-
-void cmCTestTestHandler::PrintSubprojectSummary()
+void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject)
 {
+  // collect subproject labels
   std::vector<std::string> subprojects =
     this->CTest->GetLabelsForSubprojects();
-
-  cmCTestTestHandler::ListOfTests::iterator it = this->TestList.begin();
   std::map<std::string, double> labelTimes;
   std::map<std::string, int> labelCounts;
   std::set<std::string> labels;
-  // initialize maps
   std::string::size_type maxlen = 0;
-  for (; it != this->TestList.end(); ++it) {
+  // initialize maps
+  for (cmCTestTestHandler::ListOfTests::iterator it = this->TestList.begin();
+       it != this->TestList.end(); ++it) {
     cmCTestTestProperties& p = *it;
     for (std::vector<std::string>::iterator l = p.Labels.begin();
          l != p.Labels.end(); ++l) {
+      // first check to see if the current label is a subproject label
+      bool isSubprojectLabel = false;
       std::vector<std::string>::iterator subproject =
         std::find(subprojects.begin(), subprojects.end(), *l);
       if (subproject != subprojects.end()) {
+        isSubprojectLabel = true;
+      }
+      // if we are doing sub projects and this label is one, then use it
+      // if we are not doing sub projects and the label is not one use it
+      if ((doSubProject && isSubprojectLabel) ||
+          (!doSubProject && !isSubprojectLabel)) {
         if ((*l).size() > maxlen) {
           maxlen = (*l).size();
         }
@@ -719,26 +654,32 @@ void cmCTestTestHandler::PrintSubprojectSummary()
       }
     }
   }
-  cmCTestTestHandler::TestResultsVector::iterator ri =
-    this->TestResults.begin();
   // fill maps
-  for (; ri != this->TestResults.end(); ++ri) {
+  for (cmCTestTestHandler::TestResultsVector::iterator ri =
+         this->TestResults.begin();
+       ri != this->TestResults.end(); ++ri) {
     cmCTestTestResult& result = *ri;
     cmCTestTestProperties& p = *result.Properties;
     for (std::vector<std::string>::iterator l = p.Labels.begin();
          l != p.Labels.end(); ++l) {
-      std::vector<std::string>::iterator subproject =
-        std::find(subprojects.begin(), subprojects.end(), *l);
-      if (subproject != subprojects.end()) {
+      // only use labels found in labels
+      if (labels.find(*l) != labels.end()) {
         labelTimes[*l] += result.ExecutionTime;
         ++labelCounts[*l];
       }
     }
   }
+  // if no labels are found return and print nothing
+  if (labels.empty()) {
+    return;
+  }
   // now print times
-  if (!labels.empty()) {
+  if (doSubProject) {
     cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
                        "\nSubproject Time Summary:", this->Quiet);
+  } else {
+    cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\nLabel Time Summary:",
+                       this->Quiet);
   }
   for (std::set<std::string>::const_iterator i = labels.begin();
        i != labels.end(); ++i) {
@@ -754,7 +695,6 @@ void cmCTestTestHandler::PrintSubprojectSummary()
       labelCountStr << "s";
     }
     labelCountStr << ")";
-
     cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\n"
                          << label << " = " << buf << " "
                          << labelCountStr.str(),
@@ -763,13 +703,12 @@ void cmCTestTestHandler::PrintSubprojectSummary()
       *this->LogFile << "\n" << *i << " = " << buf << "\n";
     }
   }
-  if (!labels.empty()) {
-    if (this->LogFile) {
-      *this->LogFile << "\n";
-    }
-    cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\n", this->Quiet);
+  if (this->LogFile) {
+    *this->LogFile << "\n";
   }
+  cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\n", this->Quiet);
 }
+
 void cmCTestTestHandler::CheckLabelFilterInclude(cmCTestTestProperties& it)
 {
   // if not using Labels to filter then return
diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h
index 965552c..4c5b55f 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -232,8 +232,7 @@ private:
    */
   virtual void GenerateDartOutput(cmXMLWriter& xml);
 
-  void PrintLabelSummary();
-  void PrintSubprojectSummary();
+  void PrintLabelOrSubprojectSummary(bool isSubProject);
 
   /**
    * Run the tests for a directory and any subdirectories
diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-stdout.txt
index ae00e51..e3be144 100644
--- a/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-stdout.txt
+++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-stdout.txt
@@ -4,4 +4,7 @@ Subproject Time Summary:
 MyExperimentalFeature += +[0-9.]+ sec \(5 tests\)
 MyProductionCode += +[0-9.]+ sec \(1 test\)
 +
+Label Time Summary:
+NotASubproject += +[0-9.]+ sec \(6 tests\)
++
 Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-stdout.txt
index ae00e51..e3be144 100644
--- a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-stdout.txt
+++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-stdout.txt
@@ -4,4 +4,7 @@ Subproject Time Summary:
 MyExperimentalFeature += +[0-9.]+ sec \(5 tests\)
 MyProductionCode += +[0-9.]+ sec \(1 test\)
 +
+Label Time Summary:
+NotASubproject += +[0-9.]+ sec \(6 tests\)
++
 Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stdout.txt
index a78a99a..20c6c86 100644
--- a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stdout.txt
+++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stdout.txt
@@ -3,4 +3,7 @@
 Subproject Time Summary:
 MyThirdPartyDependency += +[0-9.]+ sec \(1 test\)
 +
+Label Time Summary:
+NotASubproject += +[0-9.]+ sec \(1 test\)
++
 Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stdout.txt
index 01851fd..bec6b14 100644
--- a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stdout.txt
+++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stdout.txt
@@ -3,4 +3,7 @@
 Subproject Time Summary:
 MySubproject += +[0-9.]+ sec \(2 tests\)
 +
+Label Time Summary:
+NotASubproject += +[0-9.]+ sec \(1 test\)
++
 Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stdout.txt
index 0209bfe..1ac5530 100644
--- a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stdout.txt
+++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stdout.txt
@@ -1,7 +1,6 @@
 67% tests passed, 1 tests failed out of 3
 +
 Label Time Summary:
-MySubproject += +[0-9.]+ sec \(2 tests\)
 NotASubproject += +[0-9.]+ sec \(1 test\)
 +
 Total Test time \(real\) = +[0-9.]+ sec

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f34ac1c69b3ab0f6e3565c1c9ff7ebbd69bcab9a
commit f34ac1c69b3ab0f6e3565c1c9ff7ebbd69bcab9a
Author:     Job Noorman <job.noorman at septentrio.com>
AuthorDate: Tue Sep 5 12:14:34 2017 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 8 09:53:27 2017 -0400

    FindMatlab: Don't use the deprecated variable CMAKE_CL_64
    
    The variable is not defined on 64-bit MinGW, causing a 32-bit Matlab
    version to be found.  Check using CMAKE_SIZEOF_VOID_P instead.

diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index cd8246d..7493281 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -1134,7 +1134,14 @@ else()
 
     # testing if we are able to extract the needed information from the registry
     set(_matlab_versions_from_registry)
-    matlab_extract_all_installed_versions_from_registry(CMAKE_CL_64 _matlab_versions_from_registry)
+
+    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+      set(_matlab_win64 ON)
+    else()
+      set(_matlab_win64 OFF)
+    endif()
+
+    matlab_extract_all_installed_versions_from_registry(_matlab_win64 _matlab_versions_from_registry)
 
     # the returned list is empty, doing the search on all known versions
     if(NOT _matlab_versions_from_registry)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=014ad2989cb145586d6d32d90710a70fb9a23ad9
commit 014ad2989cb145586d6d32d90710a70fb9a23ad9
Author:     Bernhard M. Wiedemann <bwiedemann at suse.de>
AuthorDate: Sat Sep 2 20:59:16 2017 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Sep 7 13:36:11 2017 -0400

    Timestamp: support %A and %B
    
    These are defined both by [1] and [2] to give full names of a weekday
    and month.
    
    [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html
    [2] https://msdn.microsoft.com/de-de/library/fe06s4ak.aspx

diff --git a/Help/command/string.rst b/Help/command/string.rst
index ba4a412..fb3893f 100644
--- a/Help/command/string.rst
+++ b/Help/command/string.rst
@@ -324,6 +324,7 @@ specifiers:
    %j        The day of the current year (001-366).
    %m        The month of the current year (01-12).
    %b        Abbreviated month name (e.g. Oct).
+   %B        Full month name (e.g. October).
    %M        The minute of the current hour (00-59).
    %s        Seconds since midnight (UTC) 1-Jan-1970 (UNIX time).
    %S        The second of the current minute.
@@ -331,6 +332,7 @@ specifiers:
    %U        The week number of the current year (00-53).
    %w        The day of the current week. 0 is Sunday. (0-6)
    %a        Abbreviated weekday name (e.g. Fri).
+   %A        Full weekday name (e.g. Friday).
    %y        The last two digits of the current year (00-99)
    %Y        The current year.
 
diff --git a/Help/release/dev/timestamp.rst b/Help/release/dev/timestamp.rst
new file mode 100644
index 0000000..e40009e
--- /dev/null
+++ b/Help/release/dev/timestamp.rst
@@ -0,0 +1,5 @@
+timestamp
+---------
+
+* The :command:`string(TIMESTAMP)` command now supports ``%A``
+  for full weekday name and ``%B`` for full month name.
diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx
index 4dea24c..9fb79d9 100644
--- a/Source/cmTimestamp.cxx
+++ b/Source/cmTimestamp.cxx
@@ -123,7 +123,9 @@ std::string cmTimestamp::AddTimestampComponent(char flag,
 
   switch (flag) {
     case 'a':
+    case 'A':
     case 'b':
+    case 'B':
     case 'd':
     case 'H':
     case 'I':
diff --git a/Tests/RunCMake/string/Timestamp-stderr.txt b/Tests/RunCMake/string/Timestamp-stderr.txt
index 653974c..cd4dcb3 100644
--- a/Tests/RunCMake/string/Timestamp-stderr.txt
+++ b/Tests/RunCMake/string/Timestamp-stderr.txt
@@ -1 +1 @@
-RESULT=2005-08-07 23:19:49 Sun Aug 05 day=219 wd=0 week=32 %I=11 epoch=1123456789
+RESULT=2005-08-07 23:19:49 Sunday=Sun August=Aug 05 day=219 wd=0 week=32 %I=11 epoch=1123456789
diff --git a/Tests/RunCMake/string/Timestamp.cmake b/Tests/RunCMake/string/Timestamp.cmake
index d242039..cba258d 100644
--- a/Tests/RunCMake/string/Timestamp.cmake
+++ b/Tests/RunCMake/string/Timestamp.cmake
@@ -1,3 +1,3 @@
 set(ENV{SOURCE_DATE_EPOCH} "1123456789")
-string(TIMESTAMP RESULT "%Y-%m-%d %H:%M:%S %a %b %y day=%j wd=%w week=%U %%I=%I epoch=%s" UTC)
+string(TIMESTAMP RESULT "%Y-%m-%d %H:%M:%S %A=%a %B=%b %y day=%j wd=%w week=%U %%I=%I epoch=%s" UTC)
 message("RESULT=${RESULT}")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ed242807893becd4cd8245248fade93f7054c71
commit 9ed242807893becd4cd8245248fade93f7054c71
Author:     Michael Stürmer <michael.stuermer at schaeffler.com>
AuthorDate: Wed Aug 30 17:40:02 2017 +0200
Commit:     Michael Stürmer <michael.stuermer at schaeffler.com>
CommitDate: Mon Sep 4 11:42:35 2017 +0200

    VS: only add custom command line if it is not empty

diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index d038406..1b0aa14 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -225,3 +225,13 @@ of the following is specified:
   :command:`add_custom_target` command.
 ``POST_BUILD``
   Run after all other rules within the target have been executed.
+
+.. note::
+  Because generator expressions can be used in custom commands,
+  it is possible to define ``COMMAND`` lines or whole custom commands
+  which evaluate to empty strings for certain configurations.
+  For **Visual Studio 2010 (and newer)** generators these command
+  lines or custom commands will be omitted for the specific
+  configuration and no "empty-string-command" will be added.
+
+  This allows to add individual build events for every configuration.
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index 41025af..d772d95 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -191,13 +191,17 @@ std::string cmLocalVisualStudioGenerator::ConstructScript(
 
   // Write each command on a single line.
   for (unsigned int c = 0; c < ccg.GetNumberOfCommands(); ++c) {
+    // Add this command line.
+    std::string cmd = ccg.GetCommand(c);
+
+    if (cmd.empty()) {
+      continue;
+    }
+
     // Start a new line.
     script += newline;
     newline = newline_text;
 
-    // Add this command line.
-    std::string cmd = ccg.GetCommand(c);
-
     // Use "call " before any invocations of .bat or .cmd files
     // invoked as custom commands.
     //
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 86099eb..2b3d40f 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3536,11 +3536,13 @@ void cmVisualStudio10TargetGenerator::WriteEvent(
   for (std::vector<cmCustomCommand>::const_iterator i = commands.begin();
        i != commands.end(); ++i) {
     cmCustomCommandGenerator ccg(*i, configName, this->LocalGenerator);
-    comment += pre;
-    comment += lg->ConstructComment(ccg);
-    script += pre;
-    pre = "\n";
-    script += cmVS10EscapeXML(lg->ConstructScript(ccg));
+    if (!ccg.HasOnlyEmptyCommandLines()) {
+      comment += pre;
+      comment += lg->ConstructComment(ccg);
+      script += pre;
+      pre = "\n";
+      script += cmVS10EscapeXML(lg->ConstructScript(ccg));
+    }
   }
   comment = cmVS10EscapeComment(comment);
   if (this->ProjectType != csproj) {
diff --git a/Tests/RunCMake/add_custom_command/RemoveEmptyCommands-check.cmake b/Tests/RunCMake/add_custom_command/RemoveEmptyCommands-check.cmake
new file mode 100644
index 0000000..b297044
--- /dev/null
+++ b/Tests/RunCMake/add_custom_command/RemoveEmptyCommands-check.cmake
@@ -0,0 +1,63 @@
+set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/exe.vcxproj")
+if(NOT EXISTS "${vcProjectFile}")
+  set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+  return()
+endif()
+
+set(inGroup FALSE)
+set(inCommand FALSE)
+
+set(expected_Debug
+  "cmd_1 cmd_1_arg"
+  "cmd_1_dbg cmd_1_dbg_arg"
+  "cmd_2_dbg cmd_2_dbg_arg"
+  "cmd_3_dbg cmd_3_dbg_arg")
+
+set(expected_Release
+  "cmd_1 cmd_1_arg"
+  "cmd_3_rel cmd_3_rel_arg")
+
+# extract build events
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+  if(line MATCHES "^ *<ItemDefinitionGroup Condition=.*Configuration.*Platform.*>$")
+    set(inGroup TRUE)
+    string(REGEX MATCH "=='(.*)\\|(.*)'" out ${line})
+    set(config ${CMAKE_MATCH_1})
+  elseif(line MATCHES "^ *</ItemDefinitionGroup>$")
+    set(inGroup FALSE)
+  elseif(inGroup)
+    if(line MATCHES "^ *<Command>.*$")
+      set(inCommand TRUE)
+      string(REGEX MATCH "<Command>(.*)" cmd ${line})
+      set(currentCommand ${CMAKE_MATCH_1})
+    elseif(line MATCHES "^(.*)</Command>$")
+      string(REGEX MATCH "(.*)</Command>" cmd ${line})
+      list(APPEND currentCommand ${CMAKE_MATCH_1})
+      set(command_${config} ${currentCommand})
+      set(inCommand FALSE)
+    elseif(inCommand)
+      list(APPEND currentCommand ${line})
+    endif()
+  endif()
+endforeach()
+
+foreach(config "Debug" "Release")
+  set(currentName command_${config})
+  set(expectedName expected_${config})
+  set(strippedCommand "")
+  if(DEFINED ${currentName})
+    foreach(v ${${currentName}})
+      if(${v} MATCHES "cmd_")
+        list(APPEND strippedCommand ${v})
+      endif()
+    endforeach()
+    if(NOT "${strippedCommand}" STREQUAL
+      "${${expectedName}}")
+      message(" - ${strippedCommand}")
+      message(" + ${${expectedName}}")
+      set(RunCMake_TEST_FAILED "build event command does not match")
+      return()
+    endif()
+  endif()
+endforeach()
diff --git a/Tests/RunCMake/add_custom_command/RemoveEmptyCommands.cmake b/Tests/RunCMake/add_custom_command/RemoveEmptyCommands.cmake
new file mode 100644
index 0000000..eb190cc
--- /dev/null
+++ b/Tests/RunCMake/add_custom_command/RemoveEmptyCommands.cmake
@@ -0,0 +1,22 @@
+enable_language(CXX)
+
+# reduce number of configuration types
+set(CMAKE_CONFIGURATION_TYPES "Debug" "Release")
+
+set(main_file "${CMAKE_BINARY_DIR}/main.cpp")
+file(WRITE "${main_file}" "test")
+add_executable(exe "${main_file}")
+
+# add one command for all and one for debug only
+add_custom_command(TARGET exe
+  COMMAND "cmd_1" "cmd_1_arg"
+  COMMAND $<$<CONFIG:Debug>:cmd_1_dbg> $<$<CONFIG:Debug>:cmd_1_dbg_arg>)
+
+# add command for debug only
+add_custom_command(TARGET exe
+  COMMAND $<$<CONFIG:Debug>:cmd_2_dbg> $<$<CONFIG:Debug>:cmd_2_dbg_arg>)
+
+# add separate commands for configurations
+add_custom_command(TARGET exe
+  COMMAND $<$<CONFIG:Debug>:cmd_3_dbg> $<$<CONFIG:Debug>:cmd_3_dbg_arg>
+  COMMAND $<$<CONFIG:Release>:cmd_3_rel> $<$<CONFIG:Release>:cmd_3_rel_arg>)
diff --git a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
index 397c63d..c12e5aa 100644
--- a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
@@ -10,3 +10,7 @@ run_cmake(SourceByproducts)
 run_cmake(SourceUsesTerminal)
 run_cmake(TargetImported)
 run_cmake(TargetNotInDir)
+
+if(${RunCMake_GENERATOR} MATCHES "Visual Studio ([^89]|[89][0-9])")
+  run_cmake(RemoveEmptyCommands)
+endif()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34c4108bbcb8774821ac857e0ad0a92294ee8b0b
commit 34c4108bbcb8774821ac857e0ad0a92294ee8b0b
Author:     Michael Stürmer <michael.stuermer at schaeffler.com>
AuthorDate: Wed Aug 30 15:30:32 2017 +0200
Commit:     Michael Stürmer <michael.stuermer at schaeffler.com>
CommitDate: Mon Sep 4 11:41:45 2017 +0200

    add HasOnlyEmptyCommandLines() method to cmCustomCommandGenerator

diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx
index fdc0a97..c6a2800 100644
--- a/Source/cmCustomCommandGenerator.cxx
+++ b/Source/cmCustomCommandGenerator.cxx
@@ -97,6 +97,18 @@ const char* cmCustomCommandGenerator::GetArgv0Location(unsigned int c) const
   return nullptr;
 }
 
+bool cmCustomCommandGenerator::HasOnlyEmptyCommandLines() const
+{
+  for (size_t i = 0; i < this->CommandLines.size(); ++i) {
+    for (size_t j = 0; j < this->CommandLines[i].size(); ++j) {
+      if (!this->CommandLines[i][j].empty()) {
+        return false;
+      }
+    }
+  }
+  return true;
+}
+
 std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const
 {
   if (const char* emulator = this->GetCrossCompilingEmulator(c)) {
diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h
index ea33b51..34fd653 100644
--- a/Source/cmCustomCommandGenerator.h
+++ b/Source/cmCustomCommandGenerator.h
@@ -40,6 +40,7 @@ public:
   std::vector<std::string> const& GetOutputs() const;
   std::vector<std::string> const& GetByproducts() const;
   std::vector<std::string> const& GetDepends() const;
+  bool HasOnlyEmptyCommandLines() const;
 };
 
 #endif

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

Summary of changes:
 Help/command/add_custom_command.rst                |   10 ++
 Help/command/string.rst                            |    2 +
 Help/prop_test/PROCESSORS.rst                      |    9 +-
 Help/release/dev/timestamp.rst                     |    5 +
 Modules/FindMatlab.cmake                           |    9 +-
 Source/CTest/cmCTestTestHandler.cxx                |  137 ++++++--------------
 Source/CTest/cmCTestTestHandler.h                  |    3 +-
 Source/cmCustomCommandGenerator.cxx                |   12 ++
 Source/cmCustomCommandGenerator.h                  |    1 +
 Source/cmLocalVisualStudioGenerator.cxx            |   10 +-
 Source/cmTimestamp.cxx                             |    2 +
 Source/cmVisualStudio10TargetGenerator.cxx         |   12 +-
 .../CTestCommandLine/LabelCount-stdout.txt         |    4 +-
 .../RemoveEmptyCommands-check.cmake                |   63 +++++++++
 .../add_custom_command/RemoveEmptyCommands.cmake   |   22 ++++
 .../RunCMake/add_custom_command/RunCMakeTest.cmake |    4 +
 .../CTestConfigCTestScript-stdout.txt              |    7 +-
 .../CTestScriptVariable-stdout.txt                 |    7 +-
 .../CTestScriptVariableCommandLine-stdout.txt      |    5 +-
 .../ModuleVariableCMakeLists-stdout.txt            |    2 +-
 .../ModuleVariableCTestConfig-stdout.txt           |    5 +-
 .../ModuleVariableCTestConfigNoSummary-stdout.txt  |    3 +-
 .../ModuleVariableCommandLine-stdout.txt           |    2 +-
 Tests/RunCMake/string/Timestamp-stderr.txt         |    2 +-
 Tests/RunCMake/string/Timestamp.cmake              |    2 +-
 25 files changed, 214 insertions(+), 126 deletions(-)
 create mode 100644 Help/release/dev/timestamp.rst
 create mode 100644 Tests/RunCMake/add_custom_command/RemoveEmptyCommands-check.cmake
 create mode 100644 Tests/RunCMake/add_custom_command/RemoveEmptyCommands.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list