add_executable(rlist rlist.c test.c)
add_executable(queue queue.c)
add_executable(mhash mhash.c)
add_executable(rope_basic rope_basic.c ${CMAKE_SOURCE_DIR}/src/rope.c)
add_executable(rope_avl rope_avl.c ${CMAKE_SOURCE_DIR}/src/rope.c)
add_executable(rope_stress rope_stress.c ${CMAKE_SOURCE_DIR}/src/rope.c)
add_executable(rope rope.c ${CMAKE_SOURCE_DIR}/src/rope.c)
add_executable(objc_finally objc_finally.m)
add_executable(objc_catchcxx objc_catchcxx.m)
add_dependencies(objc_finally build_bundled_libs)
add_dependencies(objc_catchcxx build_bundled_libs)
set_target_properties(mhash PROPERTIES COMPILE_FLAGS "-std=c99")
target_link_libraries(objc_finally ${LIBOBJC_LIB} -lm -pthread)
target_link_libraries(objc_catchcxx ${LIBOBJC_LIB} ${LUAJIT_LIB} -lm -pthread)
if (TARGET_OS_LINUX OR TARGET_OS_DEBIAN_FREEBSD)
    target_link_libraries(objc_catchcxx dl)
endif()
