MantisBT - CMake | ||||||||||||||||||||
View Issue Details | ||||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||||||||||
0005668 | CMake | CMake | public | 2007-09-09 13:55 | 2016-06-10 14:30 | |||||||||||||||
Reporter | Trevor Kellaway | |||||||||||||||||||
Assigned To | Bill Hoffman | |||||||||||||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||||||||||||
Status | closed | Resolution | moved | |||||||||||||||||
Platform | OS | OS Version | ||||||||||||||||||
Product Version | ||||||||||||||||||||
Target Version | Fixed in Version | |||||||||||||||||||
Summary | 0005668: CMake/CTest code coverage support doesn't work for MinGW gcc under Windows | |||||||||||||||||||
Description | Under Windows MinGW gcc a CTest code coverage generation fails, using 2.4.6 or latest CVS head. This is because the gcc command line "gcc.exe -fprofile-arcs -ftest-coverage -o CMakeFiles/abc.dir/abc.obj -c M:\gcovtest\abc\abc.c" uses backslashes for the source filename, and these are encoded in the "abc.gcno" filename. When CTest cmCTestCoverageHandler.cxx cmCTestCoverageHandler::ProcessHandler() is searching for the source file it performs a directory compare, but this will fail as the slashes don't match. There are two solutions to this issue, 1) provide a way to get gcc to be passed forward slashes, 2) Modify the gcov output "File " recovered path slashes via a call to "cmSystemTools::ConvertToUnixSlashes(sourceFile);" CTest invokes gcov with the "-l" argument, and this seems completely broken by passing in backslashes, I've had to remove the "-l" from CTest to get this to work. This command line: gcov.exe -l -o "M:/gcovtest/abc/build2/CMakeFiles/abc.dir" "M:/gcovtest/abc/build2/CMakeFiles/abc.dir/abc.gcda" Produces this failure as MinGW gcov is expecting forward slashes: File `M:\gcovtest\abc\abc.c' Lines executed:100.00% of 3 M:\gcovtest\abc\abc.c:could not open output file `abc.gcda##M:\gcovtest\abc\abc.c.gcov' I'm a relative newbie regarding gcov, I thought "-l" was meant to append a header filename to the source filename? Is it even sensible to add "-l" when passing in the ".gcda" as the argument? Does this work under Cygwin? I can only suggest that "-l" isn't passed, and maybe this is somehow made configurable so it can be turned off. All these problems stem from the original MinGW gcc compile passing in native Windows backslashes to gcc as the argument; if this could be resolved the other problems would go away. | |||||||||||||||||||
Steps To Reproduce | ||||||||||||||||||||
Additional Information | ||||||||||||||||||||
Tags | No tags attached. | |||||||||||||||||||
Relationships |
| |||||||||||||||||||
Attached Files | ||||||||||||||||||||
Issue History | ||||||||||||||||||||
Date Modified | Username | Field | Change | |||||||||||||||||
2007-09-09 13:55 | Trevor Kellaway | New Issue | ||||||||||||||||||
2007-10-12 10:02 | Bill Hoffman | Status | new => assigned | |||||||||||||||||
2007-10-12 10:02 | Bill Hoffman | Assigned To | => Bill Hoffman | |||||||||||||||||
2008-10-09 13:27 | Bill Hoffman | Note Added: 0013813 | ||||||||||||||||||
2008-10-09 14:03 | Trevor Kellaway | Note Added: 0013817 | ||||||||||||||||||
2009-10-12 14:51 | David Cole | Assigned To | Bill Hoffman => David Cole | |||||||||||||||||
2009-10-12 14:56 | David Cole | Note Added: 0018061 | ||||||||||||||||||
2009-10-12 14:56 | David Cole | Status | assigned => resolved | |||||||||||||||||
2009-10-12 14:56 | David Cole | Resolution | open => fixed | |||||||||||||||||
2009-10-12 14:58 | David Cole | Note Added: 0018062 | ||||||||||||||||||
2009-10-12 14:58 | David Cole | Assigned To | David Cole => Bill Hoffman | |||||||||||||||||
2009-10-12 14:58 | David Cole | Status | resolved => assigned | |||||||||||||||||
2009-10-12 15:00 | David Cole | Relationship added | related to 0009678 | |||||||||||||||||
2009-10-12 15:08 | David Cole | Relationship added | related to 0004971 | |||||||||||||||||
2009-10-12 15:08 | David Cole | Relationship added | related to 0004972 | |||||||||||||||||
2016-06-10 14:27 | Kitware Robot | Note Added: 0041383 | ||||||||||||||||||
2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved | |||||||||||||||||
2016-06-10 14:27 | Kitware Robot | Resolution | fixed => moved | |||||||||||||||||
2016-06-10 14:30 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|