[Cmake-commits] CMake branch, master, updated. v3.12.2-625-g88e6e35

Kitware Robot kwrobot at kitware.com
Fri Sep 14 13:25:08 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  88e6e35358f0be59d2ceddb77fcb67091110b56c (commit)
       via  cff5151822d4f3e68befed01f47013d478e85bcd (commit)
       via  14a4f9a3618650771b90d6eb9f02119cbcd6983d (commit)
       via  7c94434351171a30eda1bb97ea15b3fa5ab4c0d2 (commit)
       via  ed71ec757995e78de31a083a6c8b1092b13dbc08 (commit)
       via  bdd0e2d7095932730162faebd99bc28152ca0c1c (commit)
       via  ee300dc25ddb1968d266c70cad2d382702e43b25 (commit)
       via  8ede35523e6e3b6d562d30a3df7780b66bdbd971 (commit)
       via  e549e31f798b05345de5a36f876197b595296eb4 (commit)
      from  f0c84346ed25f6b8ce3a9f79aece87a58c8a4748 (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=88e6e35358f0be59d2ceddb77fcb67091110b56c
commit 88e6e35358f0be59d2ceddb77fcb67091110b56c
Merge: cff5151 8ede355
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 14 17:23:03 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Sep 14 13:23:10 2018 -0400

    Merge topic 'module_policy_protection'
    
    8ede35523e IN_LIST: Ensure policy allows if(IN_LIST) if used by a module
    e549e31f79 CMakeIOSInstallCombined: Prevent policy leakage
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2375


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cff5151822d4f3e68befed01f47013d478e85bcd
commit cff5151822d4f3e68befed01f47013d478e85bcd
Merge: 14a4f9a ee300dc
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 14 17:20:50 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Sep 14 13:22:18 2018 -0400

    Merge topic 'boost-notfound'
    
    ee300dc25d FindBoost: Suppress imported targets warning if Boost was not found
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2376


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14a4f9a3618650771b90d6eb9f02119cbcd6983d
commit 14a4f9a3618650771b90d6eb9f02119cbcd6983d
Merge: 7c94434 ed71ec7
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 14 17:20:26 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Sep 14 13:21:26 2018 -0400

    Merge topic 'ctest-stop-time-test'
    
    ed71ec7579 CTest: Improve stop-time implementation
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2378


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c94434351171a30eda1bb97ea15b3fa5ab4c0d2
commit 7c94434351171a30eda1bb97ea15b3fa5ab4c0d2
Merge: f0c8434 bdd0e2d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 14 17:20:20 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Sep 14 13:20:27 2018 -0400

    Merge topic 'test-ninja-sub-build-fs-delay'
    
    bdd0e2d709 Tests: Extend RunCMake.Ninja filesystem delays
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2310


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed71ec757995e78de31a083a6c8b1092b13dbc08
commit ed71ec757995e78de31a083a6c8b1092b13dbc08
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 12 10:49:08 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Sep 12 10:59:55 2018 -0400

    CTest: Improve stop-time implementation
    
    The CTestTestStopTime test has been failing sporadically because the
    stop time causes the first internal test to have a timeout short enough
    that we might hit it and start the second test just before the stop time
    is reached.  Instead we should track when a timeout is shortened in
    order to stay within the stop time.  If a test times out for this reason
    then we should consider the stop time reached and not start any more
    tests.

diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 54b4be2..3e0c1ac 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -56,7 +56,6 @@ cmCTestMultiProcessHandler::cmCTestMultiProcessHandler()
   this->RunningCount = 0;
   this->ProcessorsAvailable = cmAffinity::GetProcessorsAvailable();
   this->HaveAffinity = this->ProcessorsAvailable.size();
-  this->StopTimePassed = false;
   this->HasCycles = false;
   this->SerialTestRunning = false;
 }
@@ -130,17 +129,6 @@ void cmCTestMultiProcessHandler::RunTests()
 
 bool cmCTestMultiProcessHandler::StartTestProcess(int test)
 {
-  std::chrono::system_clock::time_point stop_time = this->CTest->GetStopTime();
-  if (stop_time != std::chrono::system_clock::time_point() &&
-      stop_time <= std::chrono::system_clock::now()) {
-    cmCTestLog(this->CTest, ERROR_MESSAGE,
-               "The stop time has been passed. "
-               "Stopping all tests."
-                 << std::endl);
-    this->StopTimePassed = true;
-    return false;
-  }
-
   if (this->HaveAffinity && this->Properties[test]->WantAffinity) {
     size_t needProcessors = this->GetProcessorsUsed(test);
     if (needProcessors > this->ProcessorsAvailable.size()) {
@@ -199,6 +187,30 @@ bool cmCTestMultiProcessHandler::StartTestProcess(int test)
   return false;
 }
 
+bool cmCTestMultiProcessHandler::CheckStopTimePassed()
+{
+  if (!this->StopTimePassed) {
+    std::chrono::system_clock::time_point stop_time =
+      this->CTest->GetStopTime();
+    if (stop_time != std::chrono::system_clock::time_point() &&
+        stop_time <= std::chrono::system_clock::now()) {
+      this->SetStopTimePassed();
+    }
+  }
+  return this->StopTimePassed;
+}
+
+void cmCTestMultiProcessHandler::SetStopTimePassed()
+{
+  if (!this->StopTimePassed) {
+    cmCTestLog(this->CTest, ERROR_MESSAGE,
+               "The stop time has been passed. "
+               "Stopping all tests."
+                 << std::endl);
+    this->StopTimePassed = true;
+  }
+}
+
 void cmCTestMultiProcessHandler::LockResources(int index)
 {
   this->LockedResources.insert(
@@ -279,6 +291,10 @@ void cmCTestMultiProcessHandler::StartNextTests()
     return;
   }
 
+  if (this->CheckStopTimePassed()) {
+    return;
+  }
+
   size_t numToStart = 0;
 
   if (this->RunningCount < this->ParallelLevel) {
@@ -358,10 +374,6 @@ void cmCTestMultiProcessHandler::StartNextTests()
     }
 
     if (testLoadOk && processors <= numToStart && this->StartTest(test)) {
-      if (this->StopTimePassed) {
-        return;
-      }
-
       numToStart -= processors;
     } else if (numToStart == 0) {
       break;
@@ -424,8 +436,11 @@ void cmCTestMultiProcessHandler::FinishTestProcess(cmCTestRunTest* runner,
   auto properties = runner->GetTestProperties();
 
   bool testResult = runner->EndTest(this->Completed, this->Total, started);
+  if (runner->TimedOutForStopTime()) {
+    this->SetStopTimePassed();
+  }
   if (started) {
-    if (runner->StartAgain()) {
+    if (!this->StopTimePassed && runner->StartAgain()) {
       this->Completed--; // remove the completed test because run again
       return;
     }
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h
index 07a5fe7..3927a8a 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.h
+++ b/Source/CTest/cmCTestMultiProcessHandler.h
@@ -113,6 +113,9 @@ protected:
   inline size_t GetProcessorsUsed(int index);
   std::string GetName(int index);
 
+  bool CheckStopTimePassed();
+  void SetStopTimePassed();
+
   void LockResources(int index);
   void UnlockResources(int index);
   // map from test number to set of depend tests
@@ -125,7 +128,7 @@ protected:
   size_t RunningCount;
   std::set<size_t> ProcessorsAvailable;
   size_t HaveAffinity;
-  bool StopTimePassed;
+  bool StopTimePassed = false;
   // list of test properties (indices concurrent to the test map)
   PropertiesMap Properties;
   std::map<int, bool> TestRunningMap;
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index ef0a49d..23d4616 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -140,6 +140,9 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
   bool passed = true;
   cmProcess::State res =
     started ? this->TestProcess->GetProcessStatus() : cmProcess::State::Error;
+  if (res != cmProcess::State::Expired) {
+    this->TimeoutIsForStopTime = false;
+  }
   int retVal = this->TestProcess->GetExitValue();
   bool forceFail = false;
   bool skipped = false;
@@ -537,6 +540,7 @@ bool cmCTestRunTest::StartTest(size_t total)
 
   auto timeout = this->TestProperties->Timeout;
 
+  this->TimeoutIsForStopTime = false;
   std::chrono::system_clock::time_point stop_time = this->CTest->GetStopTime();
   if (stop_time != std::chrono::system_clock::time_point()) {
     std::chrono::duration<double> stop_timeout =
@@ -547,6 +551,7 @@ bool cmCTestRunTest::StartTest(size_t total)
     }
     if (timeout == std::chrono::duration<double>::zero() ||
         stop_timeout < timeout) {
+      this->TimeoutIsForStopTime = true;
       timeout = stop_timeout;
     }
   }
diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h
index 3b1d674..7e80157 100644
--- a/Source/CTest/cmCTestRunTest.h
+++ b/Source/CTest/cmCTestRunTest.h
@@ -80,6 +80,8 @@ public:
 
   void FinalizeTest();
 
+  bool TimedOutForStopTime() const { return this->TimeoutIsForStopTime; }
+
 private:
   bool NeedsToRerun();
   void DartProcessing();
@@ -92,6 +94,7 @@ private:
   void MemCheckPostProcess();
 
   cmCTestTestHandler::cmCTestTestProperties* TestProperties;
+  bool TimeoutIsForStopTime = false;
   // Pointer back to the "parent"; the handler that invoked this test run
   cmCTestTestHandler* TestHandler;
   cmCTest* CTest;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bdd0e2d7095932730162faebd99bc28152ca0c1c
commit bdd0e2d7095932730162faebd99bc28152ca0c1c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 12 10:21:12 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Sep 12 10:22:22 2018 -0400

    Tests: Extend RunCMake.Ninja filesystem delays
    
    On filesystems with 1s resolution the `run_sub_cmake` cases fail
    occasionally when the 1 second sleep does not cause files to have
    a different time.  Use 3 seconds instead.

diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index e0ddc9c..4b366a8 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -205,15 +205,16 @@ function(run_sub_cmake test ninja_output_path_prefix)
     set(cmd_prefix "")
     set(cmd_suffix "")
   endif()
+  set(fs_delay 3) # We assume the system as 1 sec timestamp resolution.
   file(WRITE "${top_build_ninja}" "\
 subninja ${escaped_ninja_output_path_prefix}/build.ninja
 default ${escaped_ninja_output_path_prefix}/all
 
-# Sleep for 1 second before to regenerate to make sure the timestamp of
+# Sleep for long enough before regenerating to make sure the timestamp of
 # the top build.ninja will be strictly greater than the timestamp of the
-# sub/build.ninja file. We assume the system as 1 sec timestamp resolution.
+# sub/build.ninja file.
 rule RERUN
-  command = ${cmd_prefix}\"${escaped_CMAKE_COMMAND}\" -E sleep 1 && \"${escaped_CMAKE_COMMAND}\" -E touch \"${escaped_top_build_ninja}\"${cmd_suffix}
+  command = ${cmd_prefix}\"${escaped_CMAKE_COMMAND}\" -E sleep ${fs_delay} && \"${escaped_CMAKE_COMMAND}\" -E touch \"${escaped_top_build_ninja}\"${cmd_suffix}
   description = Testing regeneration
   generator = 1
 
@@ -239,7 +240,7 @@ build build.ninja: RERUN ${escaped_build_ninja_dep} || ${escaped_ninja_output_pa
 
   # Test regeneration rules run in order.
   set(main_cmakelists "${RunCMake_SOURCE_DIR}/CMakeLists.txt")
-  sleep(1) # Assume the system as 1 sec timestamp resolution.
+  sleep(${fs_delay})
   touch("${main_cmakelists}")
   touch("${build_ninja_dep}")
   run_ninja("${top_build_dir}")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ee300dc25ddb1968d266c70cad2d382702e43b25
commit ee300dc25ddb1968d266c70cad2d382702e43b25
Author:     Roger Leigh <rleigh at codelibre.net>
AuthorDate: Wed Sep 12 13:23:24 2018 +0100
Commit:     Roger Leigh <rleigh at codelibre.net>
CommitDate: Wed Sep 12 14:44:57 2018 +0100

    FindBoost: Suppress imported targets warning if Boost was not found
    
    Fixes: #18330

diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 24ee1f2..37539ba 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -573,7 +573,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
   endif()
 
   set(_Boost_IMPORTED_TARGETS TRUE)
-  if(Boost_VERSION VERSION_LESS 103300)
+  if(Boost_VERSION AND Boost_VERSION VERSION_LESS 103300)
     message(WARNING "Imported targets and dependency information not available for Boost version ${Boost_VERSION} (all versions older than 1.33)")
     set(_Boost_IMPORTED_TARGETS FALSE)
   elseif(NOT Boost_VERSION VERSION_LESS 103300 AND Boost_VERSION VERSION_LESS 103500)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8ede35523e6e3b6d562d30a3df7780b66bdbd971
commit 8ede35523e6e3b6d562d30a3df7780b66bdbd971
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Wed Sep 12 14:50:16 2018 +0800
Commit:     Craig Scott <craig.scott at crascit.com>
CommitDate: Wed Sep 12 14:50:16 2018 +0800

    IN_LIST: Ensure policy allows if(IN_LIST) if used by a module

diff --git a/Modules/CSharpUtilities.cmake b/Modules/CSharpUtilities.cmake
index e9e1510..6a4b5c7 100644
--- a/Modules/CSharpUtilities.cmake
+++ b/Modules/CSharpUtilities.cmake
@@ -184,6 +184,9 @@ Helper functions which are used by the above ones
 
 #]=======================================================================]
 
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
 function(csharp_get_filename_keys OUT)
   set(${OUT} "")
   foreach(f ${ARGN})
@@ -304,3 +307,5 @@ function(csharp_set_xaml_cs_properties)
     endif()
   endforeach()
 endfunction()
+
+cmake_policy(POP)
diff --git a/Modules/Internal/CPack/CPackDeb.cmake b/Modules/Internal/CPack/CPackDeb.cmake
index 4ef4539..ca3a004 100644
--- a/Modules/Internal/CPack/CPackDeb.cmake
+++ b/Modules/Internal/CPack/CPackDeb.cmake
@@ -10,6 +10,9 @@ if(CMAKE_BINARY_DIR)
   message(FATAL_ERROR "CPackDeb.cmake may only be used by CPack internally.")
 endif()
 
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
 function(cpack_deb_variable_fallback OUTPUT_VAR_NAME)
   set(FALLBACK_VAR_NAMES ${ARGN})
 
@@ -579,3 +582,5 @@ function(cpack_deb_prepare_package_vars)
 endfunction()
 
 cpack_deb_prepare_package_vars()
+
+cmake_policy(POP)
diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake
index 06298d7..3bd5147 100644
--- a/Modules/Internal/CPack/CPackRPM.cmake
+++ b/Modules/Internal/CPack/CPackRPM.cmake
@@ -3,6 +3,9 @@
 
 # Author: Eric Noulard with the help of Alexander Neundorf.
 
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
 function(get_file_permissions FILE RETURN_VAR)
   execute_process(COMMAND ls -l ${FILE}
           OUTPUT_VARIABLE permissions_
@@ -1865,3 +1868,5 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT
 endfunction()
 
 cpack_rpm_generate_package()
+
+cmake_policy(POP)
diff --git a/Modules/Platform/Android-Determine.cmake b/Modules/Platform/Android-Determine.cmake
index e623902..bb42eed 100644
--- a/Modules/Platform/Android-Determine.cmake
+++ b/Modules/Platform/Android-Determine.cmake
@@ -18,6 +18,9 @@ if(CMAKE_SYSTEM_VERSION EQUAL 1)
   return()
 endif()
 
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
 # If the user provided CMAKE_SYSROOT for us, extract information from it.
 set(_ANDROID_SYSROOT_NDK "")
 set(_ANDROID_SYSROOT_API "")
@@ -371,3 +374,5 @@ endif()
 
 # Report the chosen architecture.
 message(STATUS "Android: Targeting API '${CMAKE_SYSTEM_VERSION}' with architecture '${CMAKE_ANDROID_ARCH}', ABI '${CMAKE_ANDROID_ARCH_ABI}', and processor '${CMAKE_SYSTEM_PROCESSOR}'")
+
+cmake_policy(POP)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e549e31f798b05345de5a36f876197b595296eb4
commit e549e31f798b05345de5a36f876197b595296eb4
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Wed Sep 12 14:40:37 2018 +0800
Commit:     Craig Scott <craig.scott at crascit.com>
CommitDate: Wed Sep 12 14:44:59 2018 +0800

    CMakeIOSInstallCombined: Prevent policy leakage
    
    Functions do not introduce a new policy scope, so
    surround these policy changes with a push-pop to
    prevent them from affecting the caller.

diff --git a/Modules/CMakeIOSInstallCombined.cmake b/Modules/CMakeIOSInstallCombined.cmake
index fad2e8f..418bafd 100644
--- a/Modules/CMakeIOSInstallCombined.cmake
+++ b/Modules/CMakeIOSInstallCombined.cmake
@@ -1,6 +1,8 @@
 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 # file Copyright.txt or https://cmake.org/licensing for details.
 
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
 
 # Function to print messages of this module
 function(_ios_install_combined_message)
@@ -57,6 +59,7 @@ endfunction()
 
 # Get architectures of given SDK (iphonesimulator/iphoneos)
 function(_ios_install_combined_get_valid_archs sdk resultvar)
+  cmake_policy(PUSH)
   cmake_policy(SET CMP0007 NEW)
 
   if("${resultvar}" STREQUAL "")
@@ -73,6 +76,8 @@ function(_ios_install_combined_get_valid_archs sdk resultvar)
   _ios_install_combined_message("Architectures (${sdk}): ${printable}")
 
   set("${resultvar}" "${valid_archs}" PARENT_SCOPE)
+
+  cmake_policy(POP)
 endfunction()
 
 # Final target can contain more architectures that specified by SDK. This
@@ -161,8 +166,6 @@ function(_ios_install_combined_keep_archs lib archs)
 endfunction()
 
 function(_ios_install_combined_detect_sdks this_sdk_var corr_sdk_var)
-  cmake_policy(SET CMP0057 NEW)
-
   set(this_sdk "$ENV{PLATFORM_NAME}")
   if("${this_sdk}" STREQUAL "")
     message(FATAL_ERROR "Environment variable PLATFORM_NAME is empty")
@@ -305,3 +308,5 @@ function(ios_install_combined target destination)
 
   _ios_install_combined_message("Install done: ${destination}")
 endfunction()
+
+cmake_policy(POP)

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

Summary of changes:
 Modules/CMakeIOSInstallCombined.cmake       |  9 ++++--
 Modules/CSharpUtilities.cmake               |  5 +++
 Modules/FindBoost.cmake                     |  2 +-
 Modules/Internal/CPack/CPackDeb.cmake       |  5 +++
 Modules/Internal/CPack/CPackRPM.cmake       |  5 +++
 Modules/Platform/Android-Determine.cmake    |  5 +++
 Source/CTest/cmCTestMultiProcessHandler.cxx | 49 +++++++++++++++++++----------
 Source/CTest/cmCTestMultiProcessHandler.h   |  5 ++-
 Source/CTest/cmCTestRunTest.cxx             |  5 +++
 Source/CTest/cmCTestRunTest.h               |  3 ++
 Tests/RunCMake/Ninja/RunCMakeTest.cmake     |  9 +++---
 11 files changed, 77 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list