mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-18 15:17:30 -05:00
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:
3
test/unit/test_project/.gitignore
vendored
3
test/unit/test_project/.gitignore
vendored
@@ -1 +1,2 @@
|
||||
/CMakeLists.txt
|
||||
/CMakeLists.txt
|
||||
/package-lock.cmake
|
||||
@@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
||||
|
||||
project(CPMExampleCatch2)
|
||||
project(CPMTest)
|
||||
|
||||
# ---- Options ----
|
||||
|
||||
20
test/unit/test_project/PackageLockCMakeLists.txt.in
Normal file
20
test/unit/test_project/PackageLockCMakeLists.txt.in
Normal 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()
|
||||
Reference in New Issue
Block a user