2024-03-07 06:01:53 +00:00
|
|
|
# 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
|
2024-03-07 06:09:40 +00:00
|
|
|
# add_subdirectory()
|
2024-03-07 06:01:53 +00:00
|
|
|
|
|
|
|
# INCLUDE_DIRS
|
|
|
|
|
|
|
|
|
|
|
|
# Build unit tests and link with other sources.
|
|
|
|
|
|
|
|
# Run the tests once build finished.
|
|
|
|
|
|
|
|
|