2014-06-18 07:18:58 -04:00
|
|
|
# set(TEST_LIBS ${TEST_LIBS} ${CHECK_LIBRARIES} judy libr3)
|
2014-06-18 08:27:35 -04:00
|
|
|
include_directories("${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}")
|
2014-06-18 07:18:58 -04:00
|
|
|
find_package(Check REQUIRED)
|
|
|
|
find_package(PCRE REQUIRED)
|
|
|
|
# find_package(Judy REQUIRED)
|
|
|
|
|
|
|
|
if (NOT CHECK_FOUND)
|
|
|
|
message(STATUS "Skipping unit tests, Check library not found!")
|
|
|
|
else (NOT CHECK_FOUND)
|
|
|
|
set(TEST_LIBS ${LIBS} ${CHECK_LIBRARIES} ${PCRE_LIBRARIES} r3)
|
|
|
|
|
|
|
|
include_directories(${CHECK_INCLUDE_DIRS})
|
|
|
|
# include_directories("${PROJECT_SOURCE_DIR}/include/r2")
|
2014-06-18 08:27:35 -04:00
|
|
|
add_executable(check_tree check_tree.c)
|
|
|
|
target_link_libraries(check_tree ${TEST_LIBS})
|
2014-06-18 07:18:58 -04:00
|
|
|
|
|
|
|
add_custom_command(
|
2014-06-18 08:27:35 -04:00
|
|
|
TARGET check_tree POST_BUILD
|
2014-06-18 07:18:58 -04:00
|
|
|
COMMENT "Running unit tests"
|
2014-06-18 08:27:35 -04:00
|
|
|
COMMAND check_tree
|
2014-06-18 07:18:58 -04:00
|
|
|
)
|
|
|
|
endif (NOT CHECK_FOUND)
|
|
|
|
|
|
|
|
|