File tree 2 files changed +27
-4
lines changed
2 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -528,7 +528,6 @@ function(CPMAddPackage)
528
528
BITBUCKET_REPOSITORY
529
529
GIT_REPOSITORY
530
530
SOURCE_DIR
531
- DOWNLOAD_COMMAND
532
531
FIND_PACKAGE_ARGUMENTS
533
532
NO_CACHE
534
533
SYSTEM
@@ -537,7 +536,7 @@ function(CPMAddPackage)
537
536
SOURCE_SUBDIR
538
537
)
539
538
540
- set (multiValueArgs URL OPTIONS )
539
+ set (multiValueArgs URL OPTIONS DOWNLOAD_COMMAND )
541
540
542
541
cmake_parse_arguments (CPM_ARGS "" "${oneValueArgs} " "${multiValueArgs} " "${ARGN} " )
543
542
@@ -1098,13 +1097,12 @@ function(cpm_prettify_package_arguments OUT_VAR IS_IN_COMMENT)
1098
1097
GITLAB_REPOSITORY
1099
1098
GIT_REPOSITORY
1100
1099
SOURCE_DIR
1101
- DOWNLOAD_COMMAND
1102
1100
FIND_PACKAGE_ARGUMENTS
1103
1101
NO_CACHE
1104
1102
SYSTEM
1105
1103
GIT_SHALLOW
1106
1104
)
1107
- set (multiValueArgs OPTIONS )
1105
+ set (multiValueArgs URL OPTIONS DOWNLOAD_COMMAND )
1108
1106
cmake_parse_arguments (CPM_ARGS "" "${oneValueArgs} " "${multiValueArgs} " ${ARGN} )
1109
1107
1110
1108
foreach (oneArgName ${oneValueArgs} )
Original file line number Diff line number Diff line change
1
+ require_relative './lib'
2
+
3
+ # Tests using a multi-argumenet download command to fetch a dependency
4
+
5
+ class DownloadCommand < IntegrationTest
6
+
7
+ def test_fetch_dependency_using_download_command
8
+ prj = make_project from_template : 'using-adder'
9
+
10
+ prj . create_lists_from_default_template package : <<~PACK
11
+ set(DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/_deps/testpack-adder-src)
12
+ CPMAddPackage(
13
+ NAME testpack-adder
14
+ SOURCE_DIR ${DOWNLOAD_DIR}
15
+ DOWNLOAD_COMMAND git clone --depth 1 --branch v1.0.0 https://github.com/cpm-cmake/testpack-adder.git ${DOWNLOAD_DIR}
16
+ OPTIONS "ADDER_BUILD_TESTS OFF"
17
+ )
18
+ PACK
19
+
20
+ # configure with unpopulated cache
21
+ assert_success prj . configure
22
+ assert_success prj . build
23
+ end
24
+
25
+ end
You can’t perform that action at this time.
0 commit comments