On 01/27/2011 10:56 PM, Riccardo Bellini wrote: > Hello! > I wonder if there is a way to set up and run in CMake one or more test > like those created with Qt Unit Test library. Yes, there is a way :) > I need to know in particular what commands do I have to use, just a > simple example of how to create a test executable from a test class. Here is the structure of the CMakeLists.txt shown between === lines ================ SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES ( ${KDE4_INCLUDES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ) KDE4_ADD_EXECUTABLE (riccardo_test testclass.cpp ) TARGET_LINK_LIBRARIES (riccardo_test ${QT_QTTEST_LIBRARIES} ) ADD_TEST (TestClass riccardo_test) ================ In the testclass.cpp you should have these lines along the method definitions : ================ #include <qtest_kde.h> QTEST_KDEMAIN_CORE(TestClass) ================ > Thank you very much, > > Riccardo > > > >>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<