[cmake-commits] andy committed cmCTest.cxx 1.308 1.309 cmCTest.h 1.94 1.95

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 13 17:10:50 EDT 2006


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

Modified Files:
	cmCTest.cxx cmCTest.h 
Log Message:
ENH: Properly propagate config type to test


Index: cmCTest.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.h,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- cmCTest.h	12 Oct 2006 16:51:27 -0000	1.94
+++ cmCTest.h	13 Oct 2006 21:10:48 -0000	1.95
@@ -269,6 +269,9 @@
   //! Set the output log file name
   void SetOutputLogFileName(const char* name);
 
+  //! Set the visual studio or Xcode config type
+  void SetConfigType(const char* ct);
+
   //! Various log types
   enum {
     DEBUG = 0,

Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.308
retrieving revision 1.309
diff -u -d -r1.308 -r1.309
--- cmCTest.cxx	12 Oct 2006 20:31:53 -0000	1.308
+++ cmCTest.cxx	13 Oct 2006 21:10:47 -0000	1.309
@@ -1546,14 +1546,7 @@
      i < args.size() - 1)
     {
     i++;
-    this->ConfigType = args[i];
-    cmSystemTools::ReplaceString(this->ConfigType, ".\\", "");
-    if ( !this->ConfigType.empty() )
-      {
-      std::string confTypeEnv
-        = "CMAKE_CONFIG_TYPE=" + this->ConfigType;
-      cmSystemTools::PutEnv(confTypeEnv.c_str());
-      }
+    this->SetConfigType(args[i].c_str());
     }
   
   if(this->CheckArgument(arg, "--debug"))
@@ -1848,7 +1841,7 @@
 #ifdef  CMAKE_INTDIR
   if(this->ConfigType.size() == 0)
     {
-    this->ConfigType = CMAKE_INTDIR;
+    this->SetConfigType(CMAKE_INTDIR);
     }
 #endif
 
@@ -2293,6 +2286,16 @@
 }
 
 //----------------------------------------------------------------------
+void cmCTest::SetConfigType(const char* ct)
+{
+  this->ConfigType = ct?ct:"";
+  cmSystemTools::ReplaceString(this->ConfigType, ".\\", "");
+  std::string confTypeEnv
+    = "CMAKE_CONFIG_TYPE=" + this->ConfigType;
+  cmSystemTools::PutEnv(confTypeEnv.c_str());
+}
+
+//----------------------------------------------------------------------
 bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf,
   const char* dconfig, const char* cmake_var)
 {



More information about the Cmake-commits mailing list