mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-17 14:47:30 -05:00
* use semicolon as empty command and add test * remove platform specific test coverage * only run actions for pushes and prs into master (avoid duplication) * remove cache test as it's already part of the test suite * update version * test cache reuse
31 lines
621 B
CMake
31 lines
621 B
CMake
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
project(CPMExampleDoctest)
|
|
|
|
# ---- Dependencies ----
|
|
|
|
include(../../cmake/CPM.cmake)
|
|
|
|
CPMAddPackage(
|
|
NAME fibonacci
|
|
GIT_REPOSITORY https://github.com/TheLartians/Fibonacci.git
|
|
VERSION 2.0
|
|
)
|
|
|
|
CPMAddPackage(
|
|
NAME doctest
|
|
GITHUB_REPOSITORY onqtam/doctest
|
|
GIT_TAG 2.3.2
|
|
)
|
|
|
|
# ---- Create binary ----
|
|
|
|
add_executable(CPMExampleDoctest main.cpp)
|
|
target_link_libraries(CPMExampleDoctest fibonacci doctest)
|
|
set_target_properties(CPMExampleDoctest PROPERTIES CXX_STANDARD 17)
|
|
|
|
# ---- Enable testing ----
|
|
|
|
ENABLE_TESTING()
|
|
ADD_TEST(CPMExampleDoctest CPMExampleDoctest)
|