1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
cmake_minimum_required(VERSION 3.1)
enable_testing()
add_executable(htable
htable.c)
# depending on the framework, you need to link to it
target_link_libraries(htable
eztrace-core)
target_compile_options(htable
PRIVATE
-Wall -Wextra -Wpedantic
)
target_include_directories(htable
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/include/eztrace-core/
)
add_test(NAME htable COMMAND htable)
# Get the list of tests, and set environment variables
get_property(test_list DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY TESTS)
set_property(TEST ${test_list}
PROPERTY ENVIRONMENT
"EZTRACE_LIBRARY_PATH=${EZTRACE_LIBRARY_PATH}"
)
|