[CMake] CMake QtTest integration

Kyle Edwards kyle.edwards at kitware.com
Tue Jan 15 13:56:10 EST 2019


Hello all,

I recently wrote a set of scripts to integrate QtTest into CMake,
similar to the work that Matthew Woehlke did with Google Test a while
back. The script that I wrote runs the test executable in the post-
build stage, records the list of tests in the executable, and generates
a CTest script to run them. It uses the same TEST_INCLUDE_FILES
property that the Google Test test discovery functionality uses.

You can check out the source code here:

https://github.com/Kitware/seal-tk/blob/master/src/test/CMakeLists.txt
https://github.com/Kitware/seal-tk/blob/master/cmake/QtTestDiscoverTest
s.cmake

Kyle


More information about the CMake mailing list