summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-02-26 16:36:02 (GMT)
committerBrad King <brad.king@kitware.com>2024-02-28 13:40:27 (GMT)
commitfb9a6cf909381de8eabe88913349312cce411714 (patch)
tree27b5fd0ba8a45dffc047a44b726f45f3fab08f27 /Source/cmFileCommand.cxx
parent8e6776b9f3f17aa234e38ead7047f64c539cda1c (diff)
downloadCMake-fb9a6cf909381de8eabe88913349312cce411714.zip
CMake-fb9a6cf909381de8eabe88913349312cce411714.tar.gz
CMake-fb9a6cf909381de8eabe88913349312cce411714.tar.bz2
file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION variable
Issue: #25701
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index dcdb1ae..d193375 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2025,6 +2025,12 @@ bool HandleDownloadCommand(std::vector<std::string> const& args,
++i;
}
+ if (!tls_version) {
+ if (cmValue v = status.GetMakefile().GetDefinition("CMAKE_TLS_VERSION")) {
+ tls_version = *v;
+ }
+ }
+
// Can't calculate hash if we don't save the file.
// TODO Incrementally calculate hash in the write callback as the file is
// being downloaded so this check can be relaxed.
@@ -2410,6 +2416,12 @@ bool HandleUploadCommand(std::vector<std::string> const& args,
++i;
}
+ if (!tls_version) {
+ if (cmValue v = status.GetMakefile().GetDefinition("CMAKE_TLS_VERSION")) {
+ tls_version = *v;
+ }
+ }
+
// Open file for reading:
//
FILE* fin = cmsys::SystemTools::Fopen(filename, "rb");