1
0
mirror of synced 2024-12-23 05:00:01 +01:00
modern-cmake/examples/fetch/CMakeLists.txt
Henry Schreiner 4825ba37ed
Update to CMake 3.25.0
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-11-16 14:04:30 -05:00

19 lines
425 B
CMake

cmake_minimum_required(VERSION 3.14...3.25)
project(FetchExample LANGUAGES CXX)
include(FetchContent)
include(CTest)
FetchContent_Declare(
catch
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.13.6)
# 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)