Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ option(onnxruntime_ENABLE_EXTERNAL_CUSTOM_OP_SCHEMAS "Enable registering user de

set(ONNX_CUSTOM_PROTOC_EXECUTABLE "" CACHE STRING "Specify custom protoc executable to build ONNX")

# Enable retries on connection time out and TLS handshake failures for older CMake versions
# This is implemented in latter versions of CMake, but is a nice-to-have when building
# with older versions, since onnxruntime pulls in lots of dependencies!
# 35 is in the default download_retry_codes from v3.28.5 onwards.
# 28 is in the default download_retry_codes from v3.26.1 onwards
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already require at least CMake 3.28.

cmake_minimum_required(VERSION 3.28)

if you need to use an older CMake version (and override that minimum CMake version), can you specify this with cmake ... -Ddownload_retry_codes="7;6;8;15;28;35" (or the build.py --cmake_extra_defines option)?

set(download_retry_codes 7 6 8 15 28 35)

# pre-build python path
option(onnxruntime_PREBUILT_PYTORCH_PATH "Path to pytorch installation dir")

Expand Down
Loading