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
Re: Integrating QtTest with CMake
Quote:
Originally Posted by
chiiph
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.
Quote:
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.
Re: Integrating QtTest with CMake
Ok, thanks, I'll give it a try...