2019-05-17 14:46:54 +02:00
|
|
|
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
|
|
2019-10-10 20:13:10 +02:00
|
|
|
project(CPMExampleCatch2)
|
|
|
|
|
|
2019-05-17 14:46:54 +02:00
|
|
|
# ---- Dependencies ----
|
|
|
|
|
|
|
|
|
|
include(../../cmake/CPM.cmake)
|
|
|
|
|
|
2021-03-04 10:01:01 +01:00
|
|
|
CPMAddPackage("gh:cpm-cmake/testpack-fibonacci@2.0")
|
2023-11-06 18:04:37 +01:00
|
|
|
CPMAddPackage("gh:catchorg/Catch2@3.4.0")
|
2019-05-17 14:46:54 +02:00
|
|
|
|
|
|
|
|
# ---- Create binary ----
|
|
|
|
|
|
|
|
|
|
add_executable(CPMExampleCatch2 main.cpp)
|
2023-01-10 15:31:57 +01:00
|
|
|
target_link_libraries(CPMExampleCatch2 fibonacci Catch2::Catch2WithMain)
|
2021-02-07 17:08:04 +01:00
|
|
|
target_compile_features(CPMExampleCatch2 PRIVATE cxx_std_17)
|
2019-05-17 14:46:54 +02:00
|
|
|
|
|
|
|
|
# ---- Enable testing ----
|
|
|
|
|
|
2021-01-06 14:40:33 +01:00
|
|
|
enable_testing()
|
|
|
|
|
add_test(CPMExampleCatch2 CPMExampleCatch2)
|