mirror of
https://github.com/reactos/CMake.git
synced 2025-01-19 01:42:18 +00:00
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
This commit is contained in:
commit
3bccdd89c8
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user