From 0dd2b6eb80a3fe288cf936e7bd899733231262aa Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Mon, 4 Apr 2005 12:22:08 -0400 Subject: [PATCH] BUG: By default disable new files. --- Modules/Dart.cmake | 13 ++++++++++--- Source/cmAddTestCommand.cxx | 6 +++--- Source/cmEnableTestingCommand.cxx | 6 +++--- Source/cmGlobalGenerator.cxx | 6 +++--- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Modules/Dart.cmake b/Modules/Dart.cmake index 320e4eb2f..bdea6219b 100644 --- a/Modules/Dart.cmake +++ b/Modules/Dart.cmake @@ -302,9 +302,16 @@ IF(BUILD_TESTING) # Use CTest # configure files - CONFIGURE_FILE( - ${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in - ${PROJECT_BINARY_DIR}/CTestConfiguration.ini ) + + IF(CTEST_NEW_FORMAT) + CONFIGURE_FILE( + ${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in + ${PROJECT_BINARY_DIR}/CTestConfiguration.ini ) + ELSE(CTEST_NEW_FORMAT) + CONFIGURE_FILE( + ${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in + ${PROJECT_BINARY_DIR}/DartConfiguration.tcl ) + ENDIF(CTEST_NEW_FORMAT) # # Section 3: diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx index ec539bf12..c5db5ef69 100644 --- a/Source/cmAddTestCommand.cxx +++ b/Source/cmAddTestCommand.cxx @@ -44,13 +44,13 @@ void cmAddTestCommand::FinalPass() std::string fname; fname = m_Makefile->GetStartOutputDirectory(); fname += "/"; - if ( m_Makefile->IsSet("DART_ROOT") ) + if ( m_Makefile->IsSet("CTEST_NEW_FORMAT") ) { - fname += "DartTestfile.txt"; + fname += "CTestTestfile.cmake"; } else { - fname += "CTestTestfile.cmake"; + fname += "DartTestfile.txt"; } diff --git a/Source/cmEnableTestingCommand.cxx b/Source/cmEnableTestingCommand.cxx index fe113c691..cc9c7cb7a 100644 --- a/Source/cmEnableTestingCommand.cxx +++ b/Source/cmEnableTestingCommand.cxx @@ -37,13 +37,13 @@ void cmEnableTestingCommand::CreateDartTestfileForMakefile(cmMakefile *mf) std::string fname; fname = mf->GetStartOutputDirectory(); fname += "/"; - if ( m_Makefile->IsSet("DART_ROOT") ) + if ( m_Makefile->IsSet("CTEST_NEW_FORMAT") ) { - fname += "DartTestfile.txt"; + fname += "CTestTestfile.cmake"; } else { - fname += "CTestTestfile.cmake"; + fname += "DartTestfile.txt"; } cmSystemTools::MakeDirectory(mf->GetStartOutputDirectory()); diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index d63ff0215..cbf194655 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1032,13 +1032,13 @@ void cmGlobalGenerator::SetupTests() std::string fname; fname = m_CMakeInstance->GetStartOutputDirectory(); fname += "/"; - if ( m_LocalGenerators[0]->GetMakefile()->IsSet("DART_ROOT") ) + if ( m_LocalGenerators[0]->GetMakefile()->IsSet("CTEST_NEW_FORMAT") ) { - fname += "DartTestfile.txt"; + fname += "CTestTestfile.txt"; } else { - fname += "CTestTestfile.txt"; + fname += "DartTestfile.txt"; } // If the file doesn't exist, then ENABLE_TESTING hasn't been run