summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestBuildHandler.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-04-07 17:03:47 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-04-07 17:03:47 (GMT)
commitfadff337910f1c6faf5a2e36afe54b6ea1aee0e8 (patch)
tree44f592b1d166a27ef84edda7035f5042bf75cb27 /Source/CTest/cmCTestBuildHandler.cxx
parenta1d7482548641d6695a1470c9d276288aec058a5 (diff)
downloadCMake-fadff337910f1c6faf5a2e36afe54b6ea1aee0e8.zip
CMake-fadff337910f1c6faf5a2e36afe54b6ea1aee0e8.tar.gz
CMake-fadff337910f1c6faf5a2e36afe54b6ea1aee0e8.tar.bz2
BUG: fix for bug 1717 incorrect path sent to dart server
Diffstat (limited to 'Source/CTest/cmCTestBuildHandler.cxx')
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx24
1 files changed, 23 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 110ab56..b6f4e38 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -463,7 +463,11 @@ void cmCTestBuildHandler::GenerateDartBuildOutput(
// only report the first 50 warnings and first 50 errors
unsigned short numErrorsAllowed = 50;
unsigned short numWarningsAllowed = 50;
-
+ std::string srcdir = m_CTest->GetDartConfiguration("SourceDirectory");
+ // make sure the source dir is in the correct case on windows
+ // via a call to collapse full path.
+ srcdir = cmSystemTools::CollapseFullPath(srcdir.c_str());
+ srcdir += "/";
for ( it = ew.begin();
it != ew.end() && (numErrorsAllowed || numWarningsAllowed); it++ )
{
@@ -491,6 +495,24 @@ void cmCTestBuildHandler::GenerateDartBuildOutput(
if ( re->find(cm->m_Text.c_str() ) )
{
cm->m_SourceFile = re->match(rit->m_FileIndex);
+ // At this point we need to make m_SourceFile relative to
+ // the source root of the project, so cvs links will work
+ cmSystemTools::ConvertToUnixSlashes(cm->m_SourceFile);
+ if(cm->m_SourceFile.find("/.../") != cm->m_SourceFile.npos)
+ {
+ cmSystemTools::ReplaceString(cm->m_SourceFile, "/.../", "");
+ std::string::size_type p = cm->m_SourceFile.find("/");
+ if(p != cm->m_SourceFile.npos)
+ {
+ cm->m_SourceFile = cm->m_SourceFile.substr(p+1, cm->m_SourceFile.size()-p);
+ }
+ }
+ else
+ {
+ // make sure it is a full path with the correct case
+ cm->m_SourceFile = cmSystemTools::CollapseFullPath(cm->m_SourceFile.c_str());
+ cmSystemTools::ReplaceString(cm->m_SourceFile, srcdir.c_str(), "");
+ }
cm->m_LineNumber = atoi(re->match(rit->m_LineIndex).c_str());
break;
}