BullseyeCoverage Up Contents Search

Qt Creator

This information applies to Qt Creator 3.0.1 to 4.14.

  1. To integrate BullseyeCoverage into the qmake system, add the variables shown below into your project.pro file. The variable settings have the full path of the BullseyeCoverage compiler and linker interceptors. The variables that you need to override are set in the qmake.conf file for your compiler.

    On Windows with Microsoft C++:

    QMAKE_CC           = "\"C:/Program Files/BullseyeCoverage/bin/cl\""
    QMAKE_CXX          = $$QMAKE_CC
    QMAKE_LINK         = "\"C:/Program Files/BullseyeCoverage/bin/link\""
    

    On Windows with GNU C++:

    QMAKE_CC           = "\"C:/Program Files/BullseyeCoverage/bin/gcc\""
    QMAKE_CXX          = "\"C:/Program Files/BullseyeCoverage/bin/g++\""
    QMAKE_LINK         = $$QMAKE_CXX
    QMAKE_LINK_C       = $$QMAKE_CC
    

    On Unix-like systems with GCC:

    QMAKE_CC           = /opt/BullseyeCoverage/bin/gcc
    QMAKE_CXX          = /opt/BullseyeCoverage/bin/g++
    QMAKE_LINK_C       = $$QMAKE_CC
    QMAKE_LINK_C_SHLIB = $$QMAKE_CC
    QMAKE_LINK         = $$QMAKE_CXX
    QMAKE_LINK_SHLIB   = $$QMAKE_CXX
    
  2. After modifying project.pro, use the Qt Creator command Build Run qmake. Verify the Makefile.Debug and Makefile.Release settings CC and settings CXX refer to BullseyeCoverage interceptors. For example:

    CC  = "C:/Program Files/BullseyeCoverage/bin/gcc.exe"
    CXX = "C:/Program Files/BullseyeCoverage/bin/g++.exe"
    
  3. Enable coverage build and rebuild your project.

Updated: 20 Jan 2021