mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-17 06:37:43 -05:00
31 lines
677 B
CMake
31 lines
677 B
CMake
|
|
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
||
|
|
|
||
|
|
project(CPMExampleCatch2)
|
||
|
|
|
||
|
|
# ---- Options ----
|
||
|
|
|
||
|
|
option(ENABLE_TEST_COVERAGE "Enable test coverage" OFF)
|
||
|
|
|
||
|
|
# ---- Dependencies ----
|
||
|
|
|
||
|
|
include(@CPM_PATH@/CPM.cmake)
|
||
|
|
|
||
|
|
CPMAddPackage(
|
||
|
|
NAME fibonacci
|
||
|
|
GIT_REPOSITORY https://github.com/TheLartians/Fibonacci.git
|
||
|
|
VERSION 1.0
|
||
|
|
)
|
||
|
|
|
||
|
|
CPMAddPackage(
|
||
|
|
NAME Catch2
|
||
|
|
GITHUB_REPOSITORY catchorg/Catch2
|
||
|
|
VERSION @CATCH2_VERSION@
|
||
|
|
GIT_SHALLOW YES
|
||
|
|
)
|
||
|
|
|
||
|
|
# ---- Create binary ----
|
||
|
|
|
||
|
|
add_executable(CPMExampleCatch2 main.cpp)
|
||
|
|
target_link_libraries(CPMExampleCatch2 fibonacci Catch2)
|
||
|
|
set_target_properties(CPMExampleCatch2 PROPERTIES CXX_STANDARD 17 COMPILE_FLAGS "-Wall -pedantic -Wextra -Werror")
|