Disable strict-overflow flag to avoid compilation error (#14977)
authorGu, Jinghui <jinghui.gu@intel.com>
Thu, 13 Dec 2018 06:39:29 +0000 (22:39 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 13 Dec 2018 06:41:33 +0000 (22:41 -0800)
Summary:
Disable strict-overflow flag to avoid compilation error
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14977

Differential Revision: D13447577

Pulled By: soumith

fbshipit-source-id: 1957bd5aa3c7b79219da3dd53560464977c89526

cmake/Modules/FindMKLDNN.cmake

index b4ae4dedebae3216f11c6ec9f17ebb9878e73d84..97d9683e3bef367f207f4a4290fb1fa0576c9d44 100644 (file)
@@ -115,6 +115,8 @@ find_package_handle_standard_args(MKLDNN DEFAULT_MSG ${__mkldnn_looked_for})
 IF(MKLDNN_FOUND)
   IF(NOT APPLE AND CMAKE_COMPILER_IS_GNUCC)
     ADD_COMPILE_OPTIONS(-Wno-maybe-uninitialized)
+    ADD_COMPILE_OPTIONS(-Wno-strict-overflow)
+    ADD_COMPILE_OPTIONS(-Wno-error=strict-overflow)
   ENDIF(NOT APPLE AND CMAKE_COMPILER_IS_GNUCC)
   SET(MKLDNN_THREADING "OMP:COMP")
   SET(WITH_TEST FALSE CACHE BOOL "build with mkl-dnn test" FORCE)