File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 11if (DEFINED TRITON_ONNXRUNTIME_PACKAGE_URL)
2- # Define the download and extraction paths)
2+
33 set (DOWNLOAD_PATH "${CMAKE_BINARY_DIR} /_deps/downloads/onnxruntime.zip" )
44 set (EXTRACT_DIR "${CMAKE_BINARY_DIR} /_deps/downloads/onnxruntime" )
55
66 message (NOTICE "Downloading onnxruntime: ${TRITON_ONNXRUNTIME_PACKAGE_URL} " )
77
8- # Download the file
98 file (DOWNLOAD ${TRITON_ONNXRUNTIME_PACKAGE_URL} ${DOWNLOAD_PATH} SHOW_PROGRESS STATUS DOWNLOAD_STATUS)
109
11- # Check the download status
10+ # file() STATUS returns a list with 2 elements
1211 list (GET DOWNLOAD_STATUS 0 DOWNLOAD_RESULT)
1312
14- # Extract the downloaded file if the download was successful
1513 if (NOT DOWNLOAD_RESULT EQUAL 0)
1614 message (NOTICE "Failed to download: ${TRITON_ONNXRUNTIME_PACKAGE_URL} " )
1715 else ()
1816 message (NOTICE "Download successful: ${DOWNLOAD_PATH} " )
1917
20- # Extract the downloaded file
2118 file (ARCHIVE_EXTRACT INPUT ${DOWNLOAD_PATH} DESTINATION ${EXTRACT_DIR} VERBOSE )
2219
23- # Update CMakeLists.txt configuration references with new values
2420 set (TRITON_ONNXRUNTIME_INCLUDE_PATHS ${EXTRACT_DIR} /include )
2521 set (TRITON_ONNXRUNTIME_LIB_PATHS ${EXTRACT_DIR} /lib)
2622
You can’t perform that action at this time.
0 commit comments