summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBram Wasti <bwasti@fb.com>2018-05-07 15:26:51 -0700
committerGitHub <noreply@github.com>2018-05-07 15:26:51 -0700
commited6f79ccd26d2808b2f73abeddf4c1df681f7c26 (patch)
treeb58e00e5666635710aee4f2599fafa43eb37bb25 /CMakeLists.txt
parentedbfe0294199033aa258aa55d3de6e908410df07 (diff)
downloadpytorch-ed6f79ccd26d2808b2f73abeddf4c1df681f7c26.tar.gz
pytorch-ed6f79ccd26d2808b2f73abeddf4c1df681f7c26.tar.bz2
pytorch-ed6f79ccd26d2808b2f73abeddf4c1df681f7c26.zip
[caffe2][build] Add ASAN to the debug release of caffe2 (#7107)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca2532f3f3..a880bb16e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -147,6 +147,9 @@ else()
endforeach(flag_var)
endif()
+set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
+set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_STATIC_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
+
if(ANDROID)
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s")