2020-11-18 11:52:58 -05:00
|
|
|
cmake_minimum_required(VERSION 3.14...3.19)
|
2020-08-05 16:09:16 -04:00
|
|
|
|
|
|
|
project(FetchExample LANGUAGES CXX)
|
|
|
|
|
|
|
|
include(FetchContent)
|
|
|
|
include(CTest)
|
|
|
|
|
|
|
|
FetchContent_Declare(
|
|
|
|
catch
|
|
|
|
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
2020-08-12 14:29:56 -04:00
|
|
|
GIT_TAG v2.13.0)
|
2020-08-05 16:09:16 -04:00
|
|
|
|
|
|
|
# CMake 3.14+
|
|
|
|
FetchContent_MakeAvailable(catch)
|
|
|
|
|
|
|
|
add_executable(fetch_example main.cpp)
|
|
|
|
target_link_libraries(fetch_example PRIVATE Catch2::Catch2)
|
|
|
|
add_test(NAME fetch_example COMMAND fetch_example)
|