Results 1 to 3 of 3

Thread: Integrating QtTest with CMake

  1. #1
    Join Date
    Nov 2009
    Posts
    15

    Default Integrating QtTest with CMake

    Hello everyone,

    I'm trying to build unit tests for an application I'm doing. The build system is CMake, but I can't find much docs about QtTest integration with it.

    Is that that I just need to build each test as an independent app, make the build script for each one, tell the general CMakeLists that it needs to build those, and then use:
    add_test(src/tests/SomeModule/test_app) ?

    Thanks in advance,
    Tomas

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Integrating QtTest with CMake

    Quote Originally Posted by chiiph View Post
    Is that that I just need to build each test as an independent app,
    That's how it works in using the Qt Test Library in general.
    make the build script for each one, tell the general CMakeLists that it needs to build those,
    Yes.
    [/quote]and then use:
    add_test(src/tests/SomeModule/test_app) ?
    [/QUOTE]
    This is CMake specific. I don't know what it does. If it just adds another executable to a "test" target then this is probably useful.

  3. #3
    Join Date
    Nov 2009
    Posts
    15

    Default Re: Integrating QtTest with CMake

    Ok, thanks, I'll give it a try...

Similar Threads

  1. QtTest and asserts
    By doberkofler in forum Qt Programming
    Replies: 11
    Last Post: 21st September 2010, 07:22
  2. QTTest and my own gui
    By GrahamLabdon in forum Newbie
    Replies: 0
    Last Post: 19th March 2010, 10:26
  3. QtTest example not compiling
    By GrahamLabdon in forum Newbie
    Replies: 3
    Last Post: 19th March 2010, 09:41
  4. Displaying GUI events with QtTest
    By gavingc in forum Qt Programming
    Replies: 0
    Last Post: 25th August 2009, 13:02
  5. QtTest bug
    By graeme in forum Qt Programming
    Replies: 4
    Last Post: 19th February 2006, 21:16

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.