added some stuff I found on a blog
This commit is contained in:
parent
36fea871c2
commit
f7a06af54f
|
@ -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.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue