[Cmake-commits] CMake branch, next, updated. v3.7.0-1194-gee3724f

Brad King brad.king at kitware.com
Tue Nov 15 10:11:19 EST 2016


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  ee3724f107844c57ca144171debe17be6674127e (commit)
       via  ae4cfa8b12d127d7673c6278eb67acdae6239b4e (commit)
      from  7bfcbf73fa4356f5f9506c48b6ed8aeef1cbfaaf (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=ee3724f107844c57ca144171debe17be6674127e
commit ee3724f107844c57ca144171debe17be6674127e
Merge: 7bfcbf7 ae4cfa8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 15 10:11:18 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 15 10:11:18 2016 -0500

    Merge topic 'Empty_CTestTestfile_on_BUILD_TESTING_OFF' into next
    
    ae4cfa8b Remove CTestTestfile.cmake when BUILD_TESTING is OFF


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae4cfa8b12d127d7673c6278eb67acdae6239b4e
commit ae4cfa8b12d127d7673c6278eb67acdae6239b4e
Author:     Sylvain Joubert <joubert.sy at gmail.com>
AuthorDate: Mon Nov 14 21:42:10 2016 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 15 10:08:12 2016 -0500

    Remove CTestTestfile.cmake when BUILD_TESTING is OFF
    
    When disabling BUILD_TESTING after a previous configure, the
    `CTestTestfile.cmake` was left unchanged.  As a result, ctest would see
    the tests while the user disabled testing.  Now when BUILD_TESTING is
    OFF any existing `CTestTestfile.cmake` is removed ensuring an empty test
    list.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index e7dfed5..1fda4e9 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -211,7 +211,14 @@ void cmLocalGenerator::TraceDependencies()
 
 void cmLocalGenerator::GenerateTestFiles()
 {
+  std::string file = this->StateSnapshot.GetDirectory().GetCurrentBinary();
+  file += "/";
+  file += "CTestTestfile.cmake";
+
   if (!this->Makefile->IsOn("CMAKE_TESTING_ENABLED")) {
+    if (cmSystemTools::FileExists(file)) {
+      cmSystemTools::RemoveFile(file);
+    }
     return;
   }
 
@@ -220,10 +227,6 @@ void cmLocalGenerator::GenerateTestFiles()
   const std::string& config =
     this->Makefile->GetConfigurations(configurationTypes, false);
 
-  std::string file = this->StateSnapshot.GetDirectory().GetCurrentBinary();
-  file += "/";
-  file += "CTestTestfile.cmake";
-
   cmGeneratedFileStream fout(file.c_str());
   fout.SetCopyIfDifferent(true);
 

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

Summary of changes:
 Source/cmLocalGenerator.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list