diff --git a/examples/catch2/CMakeLists.txt b/examples/catch2/CMakeLists.txt index 0af808cb6..844f5324e 100644 --- a/examples/catch2/CMakeLists.txt +++ b/examples/catch2/CMakeLists.txt @@ -16,7 +16,7 @@ endif() add_executable(${PROJECT_NAME}) target_sources(${PROJECT_NAME} PRIVATE catch2_bench.cpp) -target_link_libraries(${PROJECT_NAME} Catch2::Catch2) +target_link_libraries(${PROJECT_NAME} Catch2::Catch2WithMain) target_compile_options( ${PROJECT_NAME} diff --git a/examples/catch2/catch2_bench.cpp b/examples/catch2/catch2_bench.cpp index 4c2880410..b0f58cb45 100644 --- a/examples/catch2/catch2_bench.cpp +++ b/examples/catch2/catch2_bench.cpp @@ -1,6 +1,6 @@ #include "fib.hpp" -#define CATCH_CONFIG_MAIN -#include +#include +#include TEST_CASE("Fibonacci") {