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)
|
|
|
|
|
|
|
|
|
|
CPMAddPackage(
|
|
|
|
|
NAME fibonacci
|
2020-08-04 12:24:06 +02:00
|
|
|
GITHUB_REPOSITORY TheLartians/Fibonacci
|
2019-10-24 15:42:25 +02:00
|
|
|
VERSION 2.0
|
2019-05-17 14:46:54 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
CPMAddPackage(
|
|
|
|
|
NAME Catch2
|
2019-05-20 13:33:01 +02:00
|
|
|
GITHUB_REPOSITORY catchorg/Catch2
|
2019-05-17 14:46:54 +02:00
|
|
|
VERSION 2.5.0
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# ---- Create binary ----
|
|
|
|
|
|
|
|
|
|
add_executable(CPMExampleCatch2 main.cpp)
|
|
|
|
|
target_link_libraries(CPMExampleCatch2 fibonacci Catch2)
|
2020-04-25 00:51:18 +02:00
|
|
|
set_target_properties(CPMExampleCatch2 PROPERTIES CXX_STANDARD 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)
|