[cmake-commits] alex committed cmCTestTestHandler.cxx 1.53.2.2 1.53.2.3

cmake-commits at cmake.org cmake-commits at cmake.org
Thu May 17 10:24:39 EDT 2007


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

Modified Files:
      Tag: CMake-CrossCompileBasic
	cmCTestTestHandler.cxx 
Log Message:

ENH: merge changes from HEAD into the branch
-change INCLUDE(file [OPTIONAL] [VAR]) to INCLUDE(file [OPTIONAL] [RESULT_VARIABLE VAR])
-add tests for INCLUDE(), CMAKE_TOOLCHAIN_FILE and FIND_XXX()
-keep the stripping in CPack for now
-support a MS toolchain suffix

Alex


Index: cmCTestTestHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestTestHandler.cxx,v
retrieving revision 1.53.2.2
retrieving revision 1.53.2.3
diff -u -d -r1.53.2.2 -r1.53.2.3
--- cmCTestTestHandler.cxx	14 May 2007 13:46:59 -0000	1.53.2.2
+++ cmCTestTestHandler.cxx	17 May 2007 14:24:37 -0000	1.53.2.3
@@ -1164,17 +1164,29 @@
   for(unsigned int ai=0;
       ai < attempted.size() && fullPath.size() == 0; ++ai)
     {
-      tempPath = cmSystemTools::CollapseFullPath(attempted[ai].c_str());
-      tempPath += ctest->GetCTestConfiguration("ExecutableSuffix");
-      if(cmSystemTools::FileExists(tempPath.c_str())
-       && !cmSystemTools::FileIsDirectory(tempPath.c_str()))
+    // first check without exe extension
+    if(cmSystemTools::FileExists(attempted[ai].c_str())
+       && !cmSystemTools::FileIsDirectory(attempted[ai].c_str()))
       {
-      fullPath = tempPath;
+      fullPath = cmSystemTools::CollapseFullPath(attempted[ai].c_str());
       resultingConfig = attemptedConfigs[ai];
       }
+    // then try with the exe extension
     else
       {
-      failed.push_back(tempPath.c_str());
+      failed.push_back(attempted[ai].c_str());
+      tempPath = attempted[ai];
+      tempPath += cmSystemTools::GetExecutableExtension();
+      if(cmSystemTools::FileExists(tempPath.c_str())
+         && !cmSystemTools::FileIsDirectory(tempPath.c_str()))
+        {
+        fullPath = cmSystemTools::CollapseFullPath(tempPath.c_str());
+        resultingConfig = attemptedConfigs[ai];
+        }
+      else
+        {
+        failed.push_back(tempPath.c_str());
+        }
       }
     }
   
@@ -1189,7 +1201,7 @@
       return path;
       }
     }
-
+  
   return fullPath;
 }
 



More information about the Cmake-commits mailing list