Skip to content
Snippets Groups Projects
fetch_catch2.cmake 425 B
Newer Older
find_package(Catch2 QUIET)
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)