mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-17 06:37:43 -05:00
30 lines
568 B
Plaintext
30 lines
568 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)
|
|
ASSERT_EQUAL("${CPM_LAST_PACKAGE_NAME}" "Dependency")
|
|
|