Results 1 to 3 of 3

Thread: absolute paths - compiling for code coverage reports

  1. #1
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default absolute paths - compiling for code coverage reports

    Dear all,

    I want my application to be build with coverage analysis support. This is essentially not a problem.

    However, compiling like this generates additional files, which will then point to the relative paths used in the .pro file. This means there will be problems once the application has been run and you try to use gcov or lcov to analyze the results.

    The common solution on the internet to this appears to be to use absolute paths in your makefile, which you can do with the GNU make function ($abspath ...). Would it be possible to have qmake to insert ($abspath ...) for every file it puts in the makefile? Or would there be another solution, for instance using just QMake functionality?

    Thanks

  2. #2
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: absolute paths - compiling for code coverage reports

    I've been trying to just put the absolute path in the .pro files (which is a nasty solution), but it appears that qmake will still put relative paths in the makefile, even if you specify absolute paths in the .pro file

  3. #3
    Join Date
    Jan 2011
    Location
    Piteå, Sweden
    Posts
    13
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11

    Default Re: absolute paths - compiling for code coverage reports

    Is there still no way to enforce absolute paths to the source files? I'm in the same boat where I'm trying to get coverage reports to work, but it's a bit tricky when all the source file paths are relative to each submodule's pro file.

Similar Threads

  1. Replies: 0
    Last Post: 27th August 2010, 09:36
  2. Unit test coverage
    By leoalvesmachado in forum Newbie
    Replies: 3
    Last Post: 16th April 2010, 13:48
  3. Reports in Qt
    By c_srikanth1984 in forum Qt Programming
    Replies: 1
    Last Post: 17th June 2009, 06:57
  4. Compiling QT4 Code using cmake 2.6
    By Serenity in forum Qt Programming
    Replies: 1
    Last Post: 9th November 2008, 19:04
  5. Free code coverage analyzers
    By jpn in forum General Programming
    Replies: 4
    Last Post: 30th August 2006, 17:29

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.