summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGlobalGenerator.cxx77
-rw-r--r--Source/cmGlobalGenerator.h1
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx3
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx3
4 files changed, 0 insertions, 84 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();
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index bccf8fa..da98f52 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -211,7 +211,6 @@ protected:
void ConfigureRelativePaths();
bool RelativePathsConfigured;
- void SetupTests();
void CreateDefaultGlobalTargets(cmTargets* targets);
cmTarget CreateGlobalTarget(const char* name, const char* message,
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 70b2ad5..850a8c5 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -178,9 +178,6 @@ void cmGlobalVisualStudio6Generator::Generate()
}
}
- // add the Run Tests command
- this->SetupTests();
-
// first do the superclass method
this->cmGlobalGenerator::Generate();
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index a5c67e9..0edb056 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -235,9 +235,6 @@ void cmGlobalVisualStudio7Generator::Generate()
}
}
- // add the Run Tests command
- this->SetupTests();
-
// first do the superclass method
this->cmGlobalGenerator::Generate();