function (test_target_cpp target)
    add_executable("${target}_test" "${PROJECT_SOURCE_DIR}/cmake/test_target_cpp_main.cpp" "${ARGN}")
    find_package("doctest" CONFIG REQUIRED)
    target_link_libraries("${target}_test" "${target}" "doctest::doctest")
    add_test(NAME "${target}_test" COMMAND "${target}_test")
endfunction ()
