Add package lock (#121)

* 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
This commit is contained in:
Lars Melchior
2020-05-27 19:07:06 +02:00
committed by GitHub
parent 58365446f5
commit 4aeea1d31d
8 changed files with 175 additions and 40 deletions

View File

@@ -1 +1,2 @@
/CMakeLists.txt
/CMakeLists.txt
/package-lock.cmake

View File

@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(CPMExampleCatch2)
project(CPMTest)
# ---- Options ----

View File

@@ -0,0 +1,20 @@
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)
CPMUsePackageLock(package-lock.cmake)
@PREPARE_CODE@
CPMGetPackage(Dependency)
# ---- Call dependency method to validate correct addition of directory ----
dependency_function()