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

@@ -24,3 +24,11 @@ endif()
# ---- Call dependency method to validate correct addition of directory ----
dependency_function()
# ---- Check parameters ----
include(@CPM_PATH@/testing.cmake)
ASSERT_TRUTHY(@TEST_DEPENDENCY_NAME@_ADDED)
ASSERT_DEFINED(@TEST_DEPENDENCY_NAME@_SOURCE_DIR)
ASSERT_DEFINED(@TEST_DEPENDENCY_NAME@_BINARY_DIR)