File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 1
1
if (DEFINED TRITON_ONNXRUNTIME_PACKAGE_URL)
2
- # Define the download and extraction paths)
2
+
3
3
set (DOWNLOAD_PATH "${CMAKE_BINARY_DIR} /_deps/downloads/onnxruntime.zip" )
4
4
set (EXTRACT_DIR "${CMAKE_BINARY_DIR} /_deps/downloads/onnxruntime" )
5
5
6
6
message (NOTICE "Downloading onnxruntime: ${TRITON_ONNXRUNTIME_PACKAGE_URL} " )
7
7
8
- # Download the file
9
8
file (DOWNLOAD ${TRITON_ONNXRUNTIME_PACKAGE_URL} ${DOWNLOAD_PATH} SHOW_PROGRESS STATUS DOWNLOAD_STATUS)
10
9
11
- # Check the download status
10
+ # file() STATUS returns a list with 2 elements
12
11
list (GET DOWNLOAD_STATUS 0 DOWNLOAD_RESULT)
13
12
14
- # Extract the downloaded file if the download was successful
15
13
if (NOT DOWNLOAD_RESULT EQUAL 0)
16
14
message (NOTICE "Failed to download: ${TRITON_ONNXRUNTIME_PACKAGE_URL} " )
17
15
else ()
18
16
message (NOTICE "Download successful: ${DOWNLOAD_PATH} " )
19
17
20
- # Extract the downloaded file
21
18
file (ARCHIVE_EXTRACT INPUT ${DOWNLOAD_PATH} DESTINATION ${EXTRACT_DIR} VERBOSE )
22
19
23
- # Update CMakeLists.txt configuration references with new values
24
20
set (TRITON_ONNXRUNTIME_INCLUDE_PATHS ${EXTRACT_DIR} /include )
25
21
set (TRITON_ONNXRUNTIME_LIB_PATHS ${EXTRACT_DIR} /lib)
26
22
You can’t perform that action at this time.
0 commit comments