mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-02 03:55:34 +00:00
fix reference to Microsoft.GSL::GSL in CMake build scripts when enabling cuda (#17843)
### Description Some CMake scripts reference Microsoft.GSL::GSL. Most of the time, the GSL package that is found on the system is used. However, when cuda is enabled, it is downloaded and patched. Most CMake scripts rely on the first case and forget about the second. This patch makes the second case behave like the first case. ### Motivation and Context This is an issue that occurs 'in the wild'. For example, I had to patch this to be able to enable the CUDA provider for the onnxruntime conan package (see https://github.com/conan-io/conan-center-index/pull/20392).
This commit is contained in:
parent
dd1bb760eb
commit
87744e55fa
1 changed files with 1 additions and 0 deletions
|
|
@ -335,6 +335,7 @@ if(onnxruntime_USE_CUDA)
|
|||
URL ${DEP_URL_microsoft_gsl}
|
||||
URL_HASH SHA1=${DEP_SHA1_microsoft_gsl}
|
||||
PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/gsl/1064.patch
|
||||
FIND_PACKAGE_ARGS 4.0 NAMES Microsoft.GSL
|
||||
)
|
||||
else()
|
||||
FetchContent_Declare(
|
||||
|
|
|
|||
Loading…
Reference in a new issue