Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Custom build modes (coverage and mock)
Forum Updated to NodeBB v4.3 + New Features

Custom build modes (coverage and mock)

Scheduled Pinned Locked Moved Unsolved General and Desktop
qmake
1 Posts 1 Posters 447 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    r_b_o
    wrote on last edited by r_b_o
    #1

    Hi,

    I need to build my application in different modes, debug release and also "custom build modes", one with code coverage instrumentation and the other with some mocked objects.

    Ideally I'd like to have coverage and mock modes so that I could just call make coverage or make mock similar to standard make debug or make release available with default .
    I tried to play with different options and configs in my .pro file but could not get the desired output.

    I tried with the following commands in my .pro file

    addExclusiveBuilds(coverage, mock)
    
    CONFIG += coverage_and_mock
    CONFIG += coverage_and_mock_target
    
    CONFIG(coverage,coverage|mock) {
      DESTDIR = ./coverage
      QMAKE_CXXFLAGS += -DCOVCOV
    # other customization here ...
      message("coverage")
    }
    CONFIG(mock,coverage|mock) {
      DESTDIR = ./mock
      QMAKE_CXXFLAGS += -DMOCKMOCK
    # other customization here ...
      message("mock")
    

    Any hint on how to configure my project file so that qmake will generate Makefile.Debug, Makefile.Release, Makefile.Coverage and Makefile.Mock and the top-level Makefile calling the right sub-Makefile ?

    Note: I'm using latest Qt 5.5.1 release on a Linux host.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved