[Cmake-commits] [cmake-commits] hoffman committed cmCTestCoverageHandler.cxx 1.51.2.1 1.51.2.2

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Aug 6 17:04:22 EDT 2008


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

Modified Files:
      Tag: CMake-2-6
	cmCTestCoverageHandler.cxx 
Log Message:
ENH: merge in fixes from main tree 2.6.2 RC 1


Index: cmCTestCoverageHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestCoverageHandler.cxx,v
retrieving revision 1.51.2.1
retrieving revision 1.51.2.2
diff -C 2 -d -r1.51.2.1 -r1.51.2.2
*** cmCTestCoverageHandler.cxx	15 May 2008 19:39:58 -0000	1.51.2.1
--- cmCTestCoverageHandler.cxx	6 Aug 2008 21:04:20 -0000	1.51.2.2
***************
*** 641,644 ****
--- 641,656 ----
  
  //----------------------------------------------------------------------
+ // Fix for issue #4971 where the case of the drive letter component of
+ // the filenames might be different when analyzing gcov output.
+ //
+ // Compare file names: fnc(fn1) == fnc(fn2) // fnc == file name compare
+ //
+ #ifdef _WIN32
+ #define fnc(s) cmSystemTools::LowerCase(s)
+ #else
+ #define fnc(s) s
+ #endif
+ 
+ //----------------------------------------------------------------------
  int cmCTestCoverageHandler::HandleGCovCoverage(
    cmCTestCoverageHandlerContainer* cont)
***************
*** 970,976 ****
          {
          gcovFile = "";
          // Is it in the source dir?
          if ( sourceFile.size() > cont->SourceDir.size() &&
!           sourceFile.substr(0, cont->SourceDir.size()) == cont->SourceDir &&
            sourceFile[cont->SourceDir.size()] == '/' )
            {
--- 982,990 ----
          {
          gcovFile = "";
+ 
          // Is it in the source dir?
          if ( sourceFile.size() > cont->SourceDir.size() &&
!           (fnc(sourceFile.substr(0, cont->SourceDir.size())) ==
!             fnc(cont->SourceDir)) &&
            sourceFile[cont->SourceDir.size()] == '/' )
            {
***************
*** 982,988 ****
              = cmSystemTools::CollapseFullPath(sourceFile.c_str());
            }
          // Binary dir?
          if ( sourceFile.size() > cont->BinaryDir.size() &&
!           sourceFile.substr(0, cont->BinaryDir.size()) == cont->BinaryDir &&
            sourceFile[cont->BinaryDir.size()] == '/' )
            {
--- 996,1004 ----
              = cmSystemTools::CollapseFullPath(sourceFile.c_str());
            }
+ 
          // Binary dir?
          if ( sourceFile.size() > cont->BinaryDir.size() &&
!           (fnc(sourceFile.substr(0, cont->BinaryDir.size())) ==
!             fnc(cont->BinaryDir)) &&
            sourceFile[cont->BinaryDir.size()] == '/' )
            {
***************
*** 994,997 ****
--- 1010,1014 ----
              = cmSystemTools::CollapseFullPath(sourceFile.c_str());
            }
+ 
          if ( actualSourceFile.empty() )
            {
***************
*** 1000,1012 ****
              cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
                "Something went wrong" << std::endl);
!             cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "File: ["
                << sourceFile.c_str() << "]" << std::endl);
!             cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "s: ["
!               << sourceFile.substr(0, cont->SourceDir.size()) << "]"
                << std::endl);
!             cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "b: ["
!               << sourceFile.substr(0, cont->BinaryDir.size()) << "]"
                << std::endl);
!             *cont->OFS << "  Something went wrong. Cannot find: "
                << sourceFile.c_str()
                << " in source dir: " << cont->SourceDir.c_str()
--- 1017,1032 ----
              cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
                "Something went wrong" << std::endl);
!             cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
!               "Cannot find file: ["
                << sourceFile.c_str() << "]" << std::endl);
!             cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
!               " in source dir: ["
!               << cont->SourceDir.c_str() << "]"
                << std::endl);
!             cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
!               " or binary dir: ["
!               << cont->BinaryDir.size() << "]"
                << std::endl);
!             *cont->OFS << "  Something went wrong. Cannot find file: "
                << sourceFile.c_str()
                << " in source dir: " << cont->SourceDir.c_str()



More information about the Cmake-commits mailing list