Radek Krejci | ce24ab8 | 2015-10-08 15:37:02 +0200 | [diff] [blame^] | 1 | cmake_minimum_required(VERSION 2.6) |
| 2 | find_package(CMOCKA REQUIRED) |
| 3 | |
| 4 | add_executable(test_io test_io.c) |
| 5 | target_link_libraries(test_io ${CMOCKA_LIBRARIES} ${LIBYANG_LIBRARIES} netconf2) |
| 6 | add_test(test_io test_io) |
| 7 | |
| 8 | if(ENABLE_VALGRIND_TESTS) |
| 9 | find_program(valgrind_FOUND valgrind) |
| 10 | if(valgrind_FOUND) |
| 11 | add_test(test_io_valgrind valgrind --leak-check=full ${CMAKE_BINARY_DIR}/tests/test_io) |
| 12 | else(valgrind_FOUND) |
| 13 | Message("-- valgrind executable not found! Disabling memory leaks tests") |
| 14 | endif(valgrind_FOUND) |
| 15 | endif() |
| 16 | |
| 17 | include_directories(${CMAKE_SOURCE_DIR}/src) |
| 18 | configure_file(config.h.in config.h) |