diff options
author | Brad King <brad.king@kitware.com> | 2017-11-07 13:18:35 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-11-07 13:18:59 (GMT) |
commit | 1348f97784e0aaa1c4254011bfc9b6990993ee53 (patch) | |
tree | d6aca39d2f12c631eb572ce6502e7d1938ad38d5 /Source/cmLocalGenerator.cxx | |
parent | c37c4771cb876146ae0d23a2008482d6fcd53e35 (diff) | |
parent | 35a52bd1b4d0350d3c7e94611dd90ddb4b123352 (diff) | |
download | CMake-1348f97784e0aaa1c4254011bfc9b6990993ee53.zip CMake-1348f97784e0aaa1c4254011bfc9b6990993ee53.tar.gz CMake-1348f97784e0aaa1c4254011bfc9b6990993ee53.tar.bz2 |
Merge topic 'server-test-info'
35a52bd1 server: add "ctestInfo" request to get test info
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1414
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 12c0cfd..55952ef 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -222,7 +222,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; } @@ -231,10 +238,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); |