reorganise source and add CPMFindPackage (#92)

* reorganise source and add CPMFindPackage

* add consistent find_package behaviour

* document CPMFindPackage

* reset examples to CPMAddPackage unless tested

* update version

* update README.md

* Update README.md
This commit is contained in:
Lars Melchior
2019-10-24 15:42:25 +02:00
committed by GitHub
parent 0a8a65df32
commit 47bfb554ab
20 changed files with 199 additions and 303 deletions

View File

@@ -13,18 +13,11 @@ 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
VERSION @FIBONACCI_VERSION@
)
# ---- Create binary ----
add_executable(CPMExampleCatch2 main.cpp)
target_link_libraries(CPMExampleCatch2 fibonacci Catch2)
target_link_libraries(CPMExampleCatch2 fibonacci)
set_target_properties(CPMExampleCatch2 PROPERTIES CXX_STANDARD 17 COMPILE_FLAGS "-Wall -pedantic -Wextra -Werror")