# Find either installed version of cpputest # Or use the gitsubmodule version. if(DEFINED ENV{CPPUTEST_HOME}) message(STATUS "Using CppUTest home: $ENV{CPPUTEST_HOME}") set(CPPUTEST_INCLUDE_DIRS $ENV{CPPUTEST_HOME}/include) set(CPPUTEST_LIBRARIES $ENV{CPPUTEST_HOME}/lib) set(CPPUTEST_LDFLAGS CppUTest CppUTestExt) else() find_package(PkgConfig REQUIRED) pkg_search_module(CPPUTEST REQUIRED cpputest>=3.8) message(STATUS "Found CppUTest version ${CPPUTEST_VERSION}") endif() # TEST_DIRS add_subdirectory() # INCLUDE_DIRS # Build unit tests and link with other sources. # Run the tests once build finished.