mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-19 07:37:42 -05:00
* apply clang-format and cmake-format and add style check workflow * add declare package definition * add additional public methods and rename internals * change development verison tag to 1.0.0 * rename internal method * rename public method * rename test var * update copyright and fix comment * typo * run fix-format * fix test function names
31 lines
593 B
CMake
31 lines
593 B
CMake
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
project(CPMExampleCatch2)
|
|
|
|
# ---- Dependencies ----
|
|
|
|
include(../../cmake/CPM.cmake)
|
|
|
|
CPMAddPackage(
|
|
NAME fibonacci
|
|
GITHUB_REPOSITORY TheLartians/Fibonacci
|
|
VERSION 2.0
|
|
)
|
|
|
|
CPMAddPackage(
|
|
NAME Catch2
|
|
GITHUB_REPOSITORY catchorg/Catch2
|
|
VERSION 2.5.0
|
|
)
|
|
|
|
# ---- Create binary ----
|
|
|
|
add_executable(CPMExampleCatch2 main.cpp)
|
|
target_link_libraries(CPMExampleCatch2 fibonacci Catch2)
|
|
set_target_properties(CPMExampleCatch2 PROPERTIES CXX_STANDARD 17)
|
|
|
|
# ---- Enable testing ----
|
|
|
|
enable_testing()
|
|
add_test(CPMExampleCatch2 CPMExampleCatch2)
|