Performance improvement: bypass FetchContent for cached dependencies (#182)

* skip FetchContent for cached dependencies

* set default value for CPM_SKIP_FETCH to avoid conflicts

* add tests to check exported values
This commit is contained in:
Lars Melchior
2021-01-20 13:15:18 +01:00
committed by GitHub
parent aad0397beb
commit ab6e8d6d8c
5 changed files with 68 additions and 12 deletions

View File

@@ -22,3 +22,11 @@ CPMAddPackage(
add_executable(CPMExampleCatch2 main.cpp)
target_link_libraries(CPMExampleCatch2 fibonacci)
set_target_properties(CPMExampleCatch2 PROPERTIES CXX_STANDARD 17 COMPILE_FLAGS "-Wall -pedantic -Wextra -Werror")
# ---- Check parameters ----
include(@CPM_PATH@/testing.cmake)
ASSERT_TRUTHY(fibonacci_ADDED)
ASSERT_DEFINED(fibonacci_SOURCE_DIR)
ASSERT_DEFINED(fibonacci_BINARY_DIR)