mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-16 22:27:41 -05:00
* add package lock creation * change target name * fix cpm_export_variables * add test * fix git repo detection addition * remove test package lock from git * add link to package lock wiki * add CPMGetPackage
27 lines
551 B
Plaintext
27 lines
551 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 @TEST_DEPENDENCY_NAME@
|
|
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/dependency
|
|
)
|
|
|
|
# ---- check if generated modules override find_package ----
|
|
|
|
if (@test_check_find_package@)
|
|
find_package(@TEST_DEPENDENCY_NAME@ REQUIRED)
|
|
endif()
|
|
|
|
# ---- Call dependency method to validate correct addition of directory ----
|
|
|
|
dependency_function()
|