CatchΒΆ

find_package(Catch2 CONFIG REQUIRED)

set(SOURCES main.cpp
            foo_test.cpp
            foo.cpp)
set(HEADERS foo.hpp)

add_executable(foo_test ${SOURCES} ${HEADERS})
target_link_libraries(foo_test PUBLIC Catch2::Catch2)