changed the test template to target cpputest
This commit is contained in:
parent
04352629b2
commit
4c78b58973
|
@ -1,13 +1,10 @@
|
|||
# The module_name module tests
|
||||
list(APPEND TEST_LIBS "${CMOCKA_LIBRARIES}")
|
||||
list(APPEND TEST_LIBS module_name)
|
||||
# TEST_RUNNER
|
||||
add_library(module_name_test
|
||||
module_name.cpp
|
||||
)
|
||||
|
||||
list(APPEND TEST_DIRS "${CMOCKA_INCLUDE_DIRS}")
|
||||
list(APPEND TEST_DIRS "${PROJECT_SOURCE_DIR}/src")
|
||||
target_link_libraries(module_name_test
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
)
|
||||
|
||||
add_cmocka_test(test_module_name
|
||||
SOURCES test_module_name.c
|
||||
COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
|
||||
LINK_LIBRARIES "${TEST_LIBS}")
|
||||
add_cmocka_test_environment(test_module_name)
|
||||
target_include_directories(test_module_name PUBLIC "${TEST_DIRS}")
|
||||
|
|
Loading…
Reference in New Issue