onnxruntime/cmake/patches/onnx/onnx.patch
Changming Sun 3e9e5e9d6d
Patch Protobuf and ONNX's cmake files and enforce BinSkim check (#13694)
Patch Protobuf and ONNX's cmake files and enforce BinSkim check.

This PR has overlap with #13523 . I would prefer to get this one merged
first so that we can finished the BinSkim work, and I try to make this
PR as small as possible.
2022-11-18 10:09:47 -08:00

25 lines
1.3 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e595855..789ec80a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -545,20 +545,9 @@ endif()
if(MSVC)
target_compile_options(onnx_proto
PRIVATE /MP
- /wd4244 #'argument': conversion from 'google::
- #protobuf::uint64' to 'int', possible
- # loss of data
- /wd4267 # Conversion from 'size_t' to 'int',
- # possible loss of data
${EXTRA_FLAGS})
target_compile_options(onnx
PRIVATE /MP
- /wd4244 # 'argument': conversion from 'google::
- # protobuf::uint64' to 'int', possible
- # loss of data
- /wd4267 # Conversion from 'size_t' to 'int',
- # possible loss of data
- /wd4996 # The second parameter is ignored.
${EXTRA_FLAGS})
if(ONNX_USE_PROTOBUF_SHARED_LIBS)
target_compile_options(onnx_proto