add_executable(playground main.cpp test.cpp) target_link_libraries(playground doctest) doctest_add_test(NAME playground NO_OUTPUT COMMAND $ -nv) #add_custom_command(TARGET playground POST_BUILD COMMAND $) #add_custom_command(TARGET playground POST_BUILD COMMAND ctest -C $ --output-on-failure)