diff options
author | Brad King <brad.king@kitware.com> | 2017-03-06 18:47:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-06 18:47:49 (GMT) |
commit | 6856c659efc46b1400e14a64cf98c71257e4b24f (patch) | |
tree | 4ae2348a7cc4eee318ad2e4cad1bdc40e4cccaec /Source | |
parent | 7cb89f6732845cb5d79f82d9ca8f260c9cdddaae (diff) | |
parent | 485685fdd9dc4de8db8184c9f57f644575f1c129 (diff) | |
download | CMake-6856c659efc46b1400e14a64cf98c71257e4b24f.zip CMake-6856c659efc46b1400e14a64cf98c71257e4b24f.tar.gz CMake-6856c659efc46b1400e14a64cf98c71257e4b24f.tar.bz2 |
Merge branch 'revert-CTestTestfile-removal' into release
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 44c390c..7077bbb 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -214,14 +214,7 @@ 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; } @@ -230,6 +223,10 @@ 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); |