1 cmake_minimum_required(VERSION 2.6)
4 add_library (ctpool SHARED libctpool.c)
6 SET_TARGET_PROPERTIES( ctpool
11 INSTALL(FILES libctpool.h DESTINATION include)
12 INSTALL(TARGETS ctpool DESTINATION lib)
16 IF(CMAKE_BUILD_TYPE MATCHES Debug)
18 ADD_DEFINITIONS(-DDEBUG)
19 add_executable(example example.c)
20 target_link_libraries(example ctpool pthread )
21 add_executable(tests tests.c)
22 target_link_libraries(tests ctpool pthread )
23 add_custom_command(TARGET tests POST_BUILD COMMAND make test)
26 ADD_TEST(prio "tests" "1")
27 ADD_TEST(fifo "tests" "2")
28 ADD_TEST(lifo "tests" "3")
30 SET_TESTS_PROPERTIES(prio PROPERTIES PASS_REGULAR_EXPRESSION "0123456789")
31 SET_TESTS_PROPERTIES(fifo PROPERTIES PASS_REGULAR_EXPRESSION "5839261470")
32 SET_TESTS_PROPERTIES(lifo PROPERTIES PASS_REGULAR_EXPRESSION "0741629385")
33 ENDIF(CMAKE_BUILD_TYPE MATCHES Debug)