diff options
author | Brad King <brad.king@kitware.com> | 2007-03-05 18:01:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-03-05 18:01:02 (GMT) |
commit | 73a5c33f9b472700c10524262e8ab4cab6af2fe0 (patch) | |
tree | ccf3d133de994fe42be43f8f0fa98e54ac8f1679 /Source/cmGlobalGenerator.cxx | |
parent | 420095c013456e360c358ff0ce7d49a46222bbf2 (diff) | |
download | CMake-73a5c33f9b472700c10524262e8ab4cab6af2fe0.zip CMake-73a5c33f9b472700c10524262e8ab4cab6af2fe0.tar.gz CMake-73a5c33f9b472700c10524262e8ab4cab6af2fe0.tar.bz2 |
BUG: Removed legacy SetupTests method that was causing RUN_TESTS to test twice.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index f6b860b..92f6420 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1279,83 +1279,6 @@ void cmGlobalGenerator::SetCMakeInstance(cmake* cm) this->CMakeInstance = cm; } -void cmGlobalGenerator::SetupTests() -{ - std::string ctest = this->LocalGenerators[0]->GetMakefile()-> - GetRequiredDefinition("CMAKE_COMMAND"); - ctest = removeQuotes(ctest); - ctest = cmSystemTools::GetFilenamePath(ctest.c_str()); - ctest += "/"; - ctest += "ctest"; - ctest += cmSystemTools::GetExecutableExtension(); - if(!cmSystemTools::FileExists(ctest.c_str())) - { - ctest = this->LocalGenerators[0]->GetMakefile()-> - GetRequiredDefinition("CMAKE_COMMAND"); - ctest = cmSystemTools::GetFilenamePath(ctest.c_str()); - ctest += "/Debug/"; - ctest += "ctest"; - ctest += cmSystemTools::GetExecutableExtension(); - } - if(!cmSystemTools::FileExists(ctest.c_str())) - { - ctest = this->LocalGenerators[0]->GetMakefile()-> - GetRequiredDefinition("CMAKE_COMMAND"); - ctest = cmSystemTools::GetFilenamePath(ctest.c_str()); - ctest += "/Release/"; - ctest += "ctest"; - ctest += cmSystemTools::GetExecutableExtension(); - } - // if we found ctest - if (cmSystemTools::FileExists(ctest.c_str())) - { - // Create a full path filename for output Testfile - std::string fname; - fname = this->CMakeInstance->GetStartOutputDirectory(); - fname += "/"; - if ( this->LocalGenerators[0]->GetMakefile()->IsSet("CTEST_NEW_FORMAT") ) - { - fname += "CTestTestfile.txt"; - } - else - { - fname += "DartTestfile.txt"; - } - - // Add run_test only if any tests are foun - size_t total_tests = 0; - size_t i; - for (i = 0; i < this->LocalGenerators.size(); ++i) - { - total_tests += - this->LocalGenerators[i]->GetMakefile()->GetTests()->size(); - } - - // If the file doesn't exist, then ENABLE_TESTING hasn't been run - if (total_tests > 0) - { - const char* no_working_dir = 0; - std::vector<std::string> no_depends; - std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it; - for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) - { - std::vector<cmLocalGenerator*>& gen = it->second; - // add the RUN_TESTS to the first local generator of each project - if(gen.size()) - { - cmMakefile* mf = gen[0]->GetMakefile(); - if(const char* outDir = mf->GetDefinition("CMAKE_CFG_INTDIR")) - { - mf->AddUtilityCommand("RUN_TESTS", false, no_depends, - no_working_dir, - ctest.c_str(), "-C", outDir); - } - } - } - } - } -} - void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) { cmMakefile* mf = this->LocalGenerators[0]->GetMakefile(); |