diff options
author | Brad King <brad.king@kitware.com> | 2017-03-07 13:24:59 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-03-07 13:25:02 (GMT) |
commit | 3bccdd89c88864839a0c8d4ea56bd069c90fa02b (patch) | |
tree | cd27f2a3a366694c3fb12e33e524b6ced001ced3 /Source/cmLocalGenerator.cxx | |
parent | e66eec143c86cb36bc468b78583f689840156d99 (diff) | |
parent | 485685fdd9dc4de8db8184c9f57f644575f1c129 (diff) | |
download | CMake-3bccdd89c88864839a0c8d4ea56bd069c90fa02b.zip CMake-3bccdd89c88864839a0c8d4ea56bd069c90fa02b.tar.gz CMake-3bccdd89c88864839a0c8d4ea56bd069c90fa02b.tar.bz2 |
Merge topic 'revert-CTestTestfile-removal'
485685fd Revert "Remove CTestTestfile.cmake when BUILD_TESTING is OFF"
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !553
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-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 07d712c..82bf0b9 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -213,14 +213,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; } @@ -229,6 +222,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); |