CMake/TriBITS project integration google test and qt application.
- Add 'testframework' repo to the projects ExtraRepositoriesList.cmake
TRIBITS_PROJECT_DEFINE_EXTRA_REPOSITORIES(
TESTF_REPO "packages/testframework" GIT https:/github.com/lefebvre/testframework "NOPACKAGES" Experimental
)
- Include the 'packages/testframework/setup' into your project's CallbackSetupExtraOptions.cmake MACRO(TRIBITS_REPOSITORY_SETUP_EXTRA_OPTIONS)
ADD_SUBDIRECTORY(${${PROJECT_NAME}_SOURCE_DIR}/packages/testframework/setup)
- Include the GoogleTest module in you tests CMakeLists.txt file.
INCLUDE(GoogleTest)
- Add a test using the 'ADD_GOOGLE_TEST' macro.
ADD_GOOGLE_TEST(tstTest.cc)
Please read the ADD_GOOGLE_TEST documentation for option details.