added some stuff I found on a blog

This commit is contained in:
jakeg00dwin 2024-03-06 22:01:53 -08:00
parent 36fea871c2
commit f7a06af54f
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
# 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.