CMakeLists.txt (455B)
1 Include(FetchContent) 2 3 FetchContent_Declare( 4 Catch2 5 GIT_REPOSITORY https://github.com/catchorg/Catch2.git 6 GIT_TAG v3.4.0 # or a later release 7 SYSTEM 8 ) 9 10 FetchContent_MakeAvailable(Catch2) 11 12 add_executable(tests test.cpp) 13 target_link_libraries(tests PRIVATE Catch2::Catch2WithMain PRIVATE matrix_coro) 14 15 list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras) 16 include(CTest) 17 include(Catch) 18 catch_discover_tests(tests)