summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorJustin Goshi <jgoshi@microsoft.com>2017-10-25 22:00:15 (GMT)
committerJustin Goshi <jgoshi@microsoft.com>2017-11-03 16:39:01 (GMT)
commit35a52bd1b4d0350d3c7e94611dd90ddb4b123352 (patch)
tree9b87b1f35934532109e1b34be528cc810e66b1a2 /Source/cmLocalGenerator.cxx
parent206354ac4c2b0e245cc02f3c9f8b82990f829ee8 (diff)
downloadCMake-35a52bd1b4d0350d3c7e94611dd90ddb4b123352.zip
CMake-35a52bd1b4d0350d3c7e94611dd90ddb4b123352.tar.gz
CMake-35a52bd1b4d0350d3c7e94611dd90ddb4b123352.tar.bz2
server: add "ctestInfo" request to get test info
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 1a088ea..f47c2d4 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);