mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-18 15:17:30 -05:00
* skip FetchContent for cached dependencies * set default value for CPM_SKIP_FETCH to avoid conflicts * add tests to check exported values
28 lines
513 B
Plaintext
28 lines
513 B
Plaintext
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
project(CPMTest)
|
|
|
|
# ---- Options ----
|
|
|
|
option(ENABLE_TEST_COVERAGE "Enable test coverage" OFF)
|
|
|
|
# ---- Dependencies ----
|
|
|
|
include(@CPM_PATH@/CPM.cmake)
|
|
|
|
CPMAddPackage(
|
|
NAME Dependency
|
|
)
|
|
|
|
# ---- 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)
|