add_executable(wobler EXCLUDE_FROM_ALL src/debug/wobler/wobler.c)
target_link_libraries(wobler innards wobler_assert misc chonky automata_inner)
add_custom_target(test DEPENDS wobler wobler_assert)
add_custom_command(TARGET test POST_BUILD COMMAND wobler ARGS ${WOBLER_DUMP_LOG} WORKING_DIRECTORY ${TEST_DIR} VERBATIM)
add_custom_command(TARGET test PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tests ${CMAKE_BINARY_DIR})
add_custom_command(TARGET test PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tests ${CMAKE_BINARY_DIR})
file(COPY ${CMAKE_SOURCE_DIR}/tools/wsh DESTINATION ${CMAKE_BINARY_DIR})