[cmake-commits] king committed cmGlobalGenerator.cxx 1.167 1.168 cmGlobalGenerator.h 1.69 1.70 cmGlobalVisualStudio6Generator.cxx 1.62 1.63 cmGlobalVisualStudio7Generator.cxx 1.78 1.79

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Mar 5 13:01:04 EST 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv20305/Source

Modified Files:
	cmGlobalGenerator.cxx cmGlobalGenerator.h 
	cmGlobalVisualStudio6Generator.cxx 
	cmGlobalVisualStudio7Generator.cxx 
Log Message:
BUG: Removed legacy SetupTests method that was causing RUN_TESTS to test twice.


Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- cmGlobalGenerator.h	30 Jan 2007 16:35:17 -0000	1.69
+++ cmGlobalGenerator.h	5 Mar 2007 18:01:02 -0000	1.70
@@ -211,7 +211,6 @@
 
   void ConfigureRelativePaths();
   bool RelativePathsConfigured;
-  void SetupTests();
 
   void CreateDefaultGlobalTargets(cmTargets* targets);
   cmTarget CreateGlobalTarget(const char* name, const char* message,

Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -d -r1.167 -r1.168
--- cmGlobalGenerator.cxx	21 Feb 2007 19:07:33 -0000	1.167
+++ cmGlobalGenerator.cxx	5 Mar 2007 18:01:02 -0000	1.168
@@ -1279,83 +1279,6 @@
   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();

Index: cmGlobalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio6Generator.cxx,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- cmGlobalVisualStudio6Generator.cxx	28 Sep 2006 17:55:25 -0000	1.62
+++ cmGlobalVisualStudio6Generator.cxx	5 Mar 2007 18:01:02 -0000	1.63
@@ -178,9 +178,6 @@
       }
     }
   
-  // add the Run Tests command
-  this->SetupTests();
-  
   // first do the superclass method
   this->cmGlobalGenerator::Generate();
   

Index: cmGlobalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio7Generator.cxx,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- cmGlobalVisualStudio7Generator.cxx	9 Nov 2006 14:57:23 -0000	1.78
+++ cmGlobalVisualStudio7Generator.cxx	5 Mar 2007 18:01:02 -0000	1.79
@@ -235,9 +235,6 @@
       }
     }
 
-  // add the Run Tests command
-  this->SetupTests();
-  
   // first do the superclass method
   this->cmGlobalGenerator::Generate();
   



More information about the Cmake-commits mailing list