summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authoranderspapitto <anderspapitto@gmail.com>2018-05-07 20:43:08 -0700
committerGitHub <noreply@github.com>2018-05-07 20:43:08 -0700
commit75651c199f2b518aeef1b71cd0beaf1599aa3c8c (patch)
treec0aa7399338ffc781726636d8c20cf5495a8dfac /cmake
parentb6adecdeee6ee7584f07104661f5c2a7b8a8907c (diff)
downloadpytorch-75651c199f2b518aeef1b71cd0beaf1599aa3c8c.tar.gz
pytorch-75651c199f2b518aeef1b71cd0beaf1599aa3c8c.tar.bz2
pytorch-75651c199f2b518aeef1b71cd0beaf1599aa3c8c.zip
fix build (#7348)
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Dependencies.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
index 9b8f113b19..a4af05df68 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -599,7 +599,13 @@ set(TEMP_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
# We will build onnx as static libs and embed it directly into the binary.
set(BUILD_SHARED_LIBS OFF)
set(ONNX_USE_MSVC_STATIC_RUNTIME ${CAFFE2_USE_MSVC_STATIC_RUNTIME})
-set(ONNX_NO_WERROR ON)
+
+
+# See https://stackoverflow.com/questions/3766740/overriding-a-default-option-value-in-cmake-from-a-parent-cmakelists-txt
+set(ONNX_NO_WERROR ON CACHE BOOL "Disable use of Werror")
+
+
+
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/onnx)
include_directories(${ONNX_INCLUDE_DIRS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DONNX_NAMESPACE=${ONNX_NAMESPACE}")