include(FetchContent) find_package(Catch2) if (NOT Catch2_FOUND) message("Could not find Catch2 locally, downloading") set(FETCHCONTENT_QUIET FALSE) FetchContent_Declare( Catch2 GIT_REPOSITORY https://github.com/catchorg/Catch2 GIT_TAG devel GIT_PROGRESS TRUE OVERRIDE_FIND_PACKAGE ) FetchContent_MakeAvailable(Catch2) endif() find_package(Catch2)