From 0d107bbb738ce1f8ba9f94ca9b2d68041007919d Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 29 Apr 2021 22:22:35 -0700 Subject: [PATCH] Fix CUDA 10.2 pipeline (#7508) --- cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index e9dc313861..4605d0d08e 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -984,7 +984,7 @@ function(onnxruntime_set_compile_flags target_name) target_compile_options(${target_name} PRIVATE "$<$:SHELL:--compiler-options -Wno-deprecated-copy>" "$<$:-Wno-deprecated-copy>") endif() if(onnxruntime_USE_CUDA) - if(HAS_STRICT_ALIASING AND ${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL "11.0.0") + if(HAS_STRICT_ALIASING) target_compile_options(${target_name} PRIVATE "$<$:-Wno-strict-aliasing>") endif() endif()