cmake-cmocka-template/tests/wrap/CMakeLists.txt

14 lines
470 B
CMake

# The wrap module tests
list(APPEND TEST_LIBS "${CMOCKA_LIBRARIES}")
list(APPEND TEST_LIBS wrap)
list(APPEND TEST_DIRS "${CMOCKA_INCLUDE_DIRS}")
list(APPEND TEST_DIRS "${PROJECT_SOURCE_DIR}/src/wrap")
add_cmocka_test(test_wrap
SOURCES test_wrap.c
COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
LINK_LIBRARIES "${TEST_LIBS}")
add_cmocka_test_environment(test_wrap)
target_include_directories(test_wrap PUBLIC "${TEST_DIRS}")