Skip to content
Snippets Groups Projects
Commit a77b7a0e authored by Maxence Naud's avatar Maxence Naud
Browse files

ENHANCE: allow to use local install of Catch2 library or download latest available

parent 171e0702
No related branches found
No related tags found
1 merge request!132[UPD] version 0.4.1 -> 0.5.0
Include(FetchContent)
find_package(Catch2 REQUIRED)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.7.1 # or a later release
)
if(NOT Catch2_FOUND)
message(STATUS "Catch2 not found in system, retrieving from git")
Include(FetchContent)
FetchContent_MakeAvailable(Catch2)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG devel # or a later release
)
FetchContent_MakeAvailable(Catch2)
else()
message(STATUS "Found system Catch2 version ${Catch2_VERSION}")
endif()
file(GLOB_RECURSE src_files "*.cpp")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment