diff options
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(); |