Skip to content

Commit

Permalink
Remove /WX in ONNX
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed May 22, 2019
1 parent 262378b commit eaeb3a4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cmake/onnx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@ macro(configure_onnx)

message(STATUS "Configuring onnx...")
set(DAQ_ONNX_NAMESPACE onnx_daq)

if (MSVC)
set(ONNX_CMAKELISTS ${PROJECT_SOURCE_DIR}/third_party/onnx/CMakeLists.txt)
file(READ ${ONNX_CMAKELISTS} content)
string(
REPLACE
"/WX"
""
content
"${content}"
)
file(WRITE ${ONNX_CMAKELISTS} "${content}")
endif()
set(ONNX_NAMESPACE ${DAQ_ONNX_NAMESPACE} CACHE STRING "onnx namespace")
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/onnx)
# Since https://github.com/onnx/onnx/pull/1318 is merged, we don't need to set it manually
Expand Down

0 comments on commit eaeb3a4

Please sign in to comment.