File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ option(XPYT_USE_SHARED_XEUS_PYTHON "Link xpython and xpython_extension with the
4444
4545option (XPYT_EMSCRIPTEN_WASM_BUILD "Build for wasm with emscripten" OFF )
4646
47+ option (XPYT_SANITIZE_ADDRESS "Enable address sanitizer" OFF )
48+
4749# Test options
4850option (XPYT_BUILD_TESTS "xeus-python test suite" OFF )
4951
@@ -250,6 +252,10 @@ macro(xpyt_set_common_options target_name)
250252 CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR
251253 CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
252254 target_compile_options (${target_name} PUBLIC -Wunused-parameter -Wextra -Wreorder )
255+ if (XPYT_SANITIZE_ADDRESS)
256+ target_compile_options (${target_name} PUBLIC -fsanitize=address -fno-omit-frame-pointer )
257+ target_link_options (${target_name} PUBLIC -fsanitize=address )
258+ endif ()
253259 endif ()
254260endmacro ()
255261
You can’t perform that action at this time.
0 commit comments