blob: d6b970b5475fb8e17188a6c73d521f08b98847b7 [file] [log] [blame]
Radek Krejcice24ab82015-10-08 15:37:02 +02001cmake_minimum_required(VERSION 2.6)
2find_package(CMOCKA REQUIRED)
3
4add_executable(test_io test_io.c)
5target_link_libraries(test_io ${CMOCKA_LIBRARIES} ${LIBYANG_LIBRARIES} netconf2)
6add_test(test_io test_io)
7
8if(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)
15endif()
16
17include_directories(${CMAKE_SOURCE_DIR}/src)
18configure_file(config.h.in config.h)