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

@@ -17,3 +17,11 @@ CPMAddPackage(
# ---- Call dependency method to validate correct addition of directory ----
dependency_function()
# ---- Check parameters ----
include(@CPM_PATH@/testing.cmake)
ASSERT_TRUTHY(Dependency_ADDED)
ASSERT_DEFINED(Dependency_SOURCE_DIR)
ASSERT_DEFINED(Dependency_BINARY_DIR)