summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2023-10-01 11:12:37 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-10-01 11:12:56 (GMT)
commit7ab880421af389c23807b15536947bccf26c5ffe (patch)
treeba7e26d3081cefbf988abf78c67a38b60d75be9a /Modules
parent6b645297b910d3f25f5a6fe363c128bda11f6dc4 (diff)
parent872daff159d8c7b3bfdabe3918c2832539168c91 (diff)
downloadCMake-7ab880421af389c23807b15536947bccf26c5ffe.zip
CMake-7ab880421af389c23807b15536947bccf26c5ffe.tar.gz
CMake-7ab880421af389c23807b15536947bccf26c5ffe.tar.bz2
Merge topic 'ExternalProject-declare-download-byproducts'
872daff159 ExternalProject: declare byproducts for the download step Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8823
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ExternalProject.cmake14
1 files changed, 9 insertions, 5 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 36eb70e..f43f48d 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -2825,6 +2825,7 @@ function(_ep_add_download_command name)
set(comment)
set(work_dir)
set(extra_repo_info)
+ set(byproduct_file)
if(cmd_set)
set(work_dir ${download_dir})
@@ -3105,14 +3106,16 @@ hash=${hash}
get_filename_component(fname "${fname}" NAME)
else()
# Fall back to a default file name. The actual file name does not
- # matter because it is used only internally and our extraction tool
- # inspects the file content directly. If it turns out the wrong URL
- # was given that will be revealed during the build which is an easier
- # place for users to diagnose than an error here anyway.
- set(fname "archive.tar")
+ # matter as long as it doesn't conflict with other projects because
+ # it is used only internally and our extraction tool inspects the
+ # file content directly. If it turns out the wrong URL was given
+ # that will be revealed during the build which is an easier place for
+ # users to diagnose than an error here anyway.
+ set(fname "${name}-archive.tar")
endif()
string(REPLACE ";" "-" fname "${fname}")
set(file ${download_dir}/${fname})
+ set(byproduct_file "${download_dir}/${fname}")
get_property(timeout TARGET ${name} PROPERTY _EP_TIMEOUT)
get_property(inactivity_timeout
TARGET ${name}
@@ -3289,6 +3292,7 @@ hash=${hash}
COMMAND ${__cmdQuoted}
WORKING_DIRECTORY \${work_dir}
DEPENDS \${depends}
+ BYPRODUCTS \${byproduct_file}
DEPENDEES mkdir
${log}
${uses_terminal}