[cmake-commits] hoffman committed cmCTestBuildAndTestHandler.cxx 1.18 1.19

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Sep 11 14:43:19 EDT 2007


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

Modified Files:
	cmCTestBuildAndTestHandler.cxx 
Log Message:
ENH: for build and test default the config type to the one that ctest was built with, it is good for the current ctest setup, and other projects can always specify a value on the command line


Index: cmCTestBuildAndTestHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestBuildAndTestHandler.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- cmCTestBuildAndTestHandler.cxx	6 Jun 2007 15:02:24 -0000	1.18
+++ cmCTestBuildAndTestHandler.cxx	11 Sep 2007 18:43:17 -0000	1.19
@@ -72,10 +72,20 @@
     generator += this->BuildGenerator;
     args.push_back(generator);
     }
+  
+  const char* config = 0;
   if ( this->CTest->GetConfigType().size() > 0 )
     {
+    config = this->CTest->GetConfigType().c_str();
+    }
+#ifdef CMAKE_INTDIR
+  config = CMAKE_INTDIR;
+#endif
+  
+  if ( config )
+    {
     std::string btype
-      = "-DCMAKE_BUILD_TYPE:STRING=" + this->CTest->GetConfigType();
+      = "-DCMAKE_BUILD_TYPE:STRING=" + std::string(config);
     args.push_back(btype);
     }
 
@@ -235,11 +245,23 @@
         }
       }
     std::string output;
+    const char* config = 0;
+    if ( this->CTest->GetConfigType().size() > 0 )
+      {
+      config = this->CTest->GetConfigType().c_str();
+      }
+#ifdef CMAKE_INTDIR
+    config = CMAKE_INTDIR;
+#endif
+    if(!config)
+      {
+      config = "Debug";
+      }
     int retVal = cm.GetGlobalGenerator()->Build(
       this->SourceDir.c_str(), this->BinaryDir.c_str(),
       this->BuildProject.c_str(), tarIt->c_str(),
       &output, this->BuildMakeProgram.c_str(),
-      this->CTest->GetConfigType().c_str(),
+      config,
       !this->BuildNoClean, 
       false, remainingTime);
 



More information about the Cmake-commits mailing list