2018-07-01 00:31:49 -04:00
|
|
|
function(add_r3_test NAME)
|
|
|
|
add_executable(${NAME} ${ARGN})
|
2014-06-18 07:18:58 -04:00
|
|
|
|
2018-09-17 14:54:13 -04:00
|
|
|
if(WIN32)
|
|
|
|
target_compile_definitions(${NAME}
|
|
|
|
PRIVATE
|
|
|
|
_CRT_SECURE_NO_WARNINGS
|
|
|
|
)
|
|
|
|
endif(WIN32)
|
|
|
|
|
2018-07-01 00:31:49 -04:00
|
|
|
target_include_directories(${NAME}
|
|
|
|
PRIVATE
|
|
|
|
${CHECK_INCLUDE_DIRS}
|
|
|
|
${PROJECT_BINARY_DIR}
|
|
|
|
${PROJECT_SOURCE_DIR}/src)
|
2014-06-18 07:18:58 -04:00
|
|
|
|
2018-07-01 00:31:49 -04:00
|
|
|
target_link_libraries(${NAME}
|
2018-09-17 11:19:12 -04:00
|
|
|
${CHECK_LIBRARIES}
|
2018-07-01 00:31:49 -04:00
|
|
|
r3)
|
2014-06-18 07:18:58 -04:00
|
|
|
|
2018-07-01 00:31:49 -04:00
|
|
|
add_test(NAME ${NAME} COMMAND ${NAME})
|
|
|
|
endfunction()
|
2014-06-18 07:18:58 -04:00
|
|
|
|
2018-07-01 00:31:49 -04:00
|
|
|
add_r3_test(check_tree check_tree.c)
|
|
|
|
add_r3_test(check_slug check_slug.c)
|
|
|
|
add_r3_test(check_routes check_routes.c)
|
|
|
|
add_r3_test(check_str_array check_str_array.c)
|
2014-06-18 07:18:58 -04:00
|
|
|
|
2018-07-01 00:31:49 -04:00
|
|
|
add_executable(bench bench.c)
|
|
|
|
target_link_libraries(bench r3)
|