Files
CPM.cmake/examples/catch2/CMakeLists.txt
2021-03-04 11:01:01 +02:00

22 lines
509 B
CMake

cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(CPMExampleCatch2)
# ---- Dependencies ----
include(../../cmake/CPM.cmake)
CPMAddPackage("gh:cpm-cmake/testpack-fibonacci@2.0")
CPMAddPackage("gh:catchorg/Catch2@2.13.4")
# ---- Create binary ----
add_executable(CPMExampleCatch2 main.cpp)
target_link_libraries(CPMExampleCatch2 fibonacci Catch2)
target_compile_features(CPMExampleCatch2 PRIVATE cxx_std_17)
# ---- Enable testing ----
enable_testing()
add_test(CPMExampleCatch2 CPMExampleCatch2)