cmake_cpputest_template/tests/CMakeLists.txt

25 lines
648 B
CMake
Raw Normal View History

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
# 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.