diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2020-06-01 04:58:42 +0800 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-05 08:56:32 -0400 |
commit | a6e1b20bab6ab7566a887d43f50c35c112c62b3d (patch) | |
tree | f2ec3fa0f121b00ab1a7ee05a7d5afd15bc36d01 /Tests/RunCMake/CPack | |
parent | 21218f5c1277ff840e1a7b6128af3b2abe0d35d3 (diff) | |
download | cmake-a6e1b20bab6ab7566a887d43f50c35c112c62b3d.tar.gz |
CPack External: Introduce `CPACK_EXTERNAL_BUILT_PACKAGES`
The `CPACK_EXTERNAL_PACKAGE_SCRIPT` script may set this list variable to the
full paths of generated package files. CPack copy these files from the stage
directory back to the top build directory and possibly produce checksum files
if the `CPACK_PACKAGE_CHECKSUM` is set.
Diffstat (limited to 'Tests/RunCMake/CPack')
3 files changed, 19 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake b/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake index 6f7c4c224e..3db80142f2 100644 --- a/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake +++ b/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake @@ -29,3 +29,11 @@ expect_file(${CPACK_TEMPORARY_DIRECTORY}/f3/share/cpack-test/f3.txt) expect_file(${CPACK_TEMPORARY_DIRECTORY}/f4/share/cpack-test/f4.txt) message(STATUS "This status message is expected to be visible") + +set( + CPACK_EXTERNAL_BUILT_PACKAGES + ${CPACK_TEMPORARY_DIRECTORY}/f1/share/cpack-test/f1.txt + ${CPACK_TEMPORARY_DIRECTORY}/f2/share/cpack-test/f2.txt + ${CPACK_TEMPORARY_DIRECTORY}/f3/share/cpack-test/f3.txt + ${CPACK_TEMPORARY_DIRECTORY}/f4/share/cpack-test/f4.txt + ) diff --git a/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt b/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt index 37d635fa46..587b2e8106 100644 --- a/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt +++ b/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt @@ -1 +1,11 @@ -- This status message is expected to be visible +CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/external-0\.1\.1-.*\.json generated\. +CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/external-0\.1\.1-.*\.json\.sha1 generated\. +CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f1\.txt generated\. +CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f1\.txt\.sha1 generated\. +CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f2\.txt generated\. +CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f2\.txt\.sha1 generated\. +CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f3\.txt generated\. +CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f3\.txt\.sha1 generated\. +CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f4\.txt generated\. +CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f4\.txt\.sha1 generated\. diff --git a/Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake b/Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake index bc9766b153..d4781baad4 100644 --- a/Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake +++ b/Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake @@ -17,6 +17,7 @@ elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "invalid_bad") elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "stage_and_package") set(CPACK_EXTERNAL_ENABLE_STAGING 1) set(CPACK_EXTERNAL_PACKAGE_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/create_package.cmake") + set(CPACK_PACKAGE_CHECKSUM SHA1) endif() file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/f1.txt" test1) |