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(CPMExampleDoctest)
|
|
|
|
|
|
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-01-10 15:31:57 +01:00
|
|
|
CPMAddPackage("gh:onqtam/doctest@2.4.9")
|
2019-05-17 14:46:54 +02:00
|
|
|
|
|
|
|
|
# ---- Create binary ----
|
|
|
|
|
|
|
|
|
|
add_executable(CPMExampleDoctest main.cpp)
|
|
|
|
|
target_link_libraries(CPMExampleDoctest fibonacci doctest)
|
2021-02-07 17:08:04 +01:00
|
|
|
target_compile_features(CPMExampleDoctest 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(CPMExampleDoctest CPMExampleDoctest)
|