File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,6 +234,15 @@ file(GLOB XTENSOR_PREPROCESS_FILES files/cppy_source/*.cppy)
234234# Sanitizer support
235235include (${CMAKE_SOURCE_DIR} /cmake/sanitizers.cmake )
236236
237+ if (USE_SANITIZER MATCHES "memory" AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
238+ set (XTENSOR_MSAN_IGNORELIST_FILE "${CMAKE_CURRENT_SOURCE_DIR} /msan_ignorelist.txt" )
239+ set_source_files_properties (
240+ main.cpp
241+ PROPERTIES
242+ COMPILE_OPTIONS "-fsanitize-ignorelist=${XTENSOR_MSAN_IGNORELIST_FILE} "
243+ )
244+ endif ()
245+
237246# This target should only be run when the test source files have been changed.
238247add_custom_target (
239248 preprocess_cppy
@@ -289,13 +298,6 @@ endif()
289298
290299target_compile_options (test_xtensor_lib PRIVATE $<$<BOOL :USE_SANITIZER >:${SANITIZER_COMPILE_OPTIONS} >)
291300target_link_options (test_xtensor_lib PRIVATE $<$<BOOL :USE_SANITIZER >:${SANITIZER_LINK_OPTIONS} >)
292- # if(USE_SANITIZER MATCHES "memory" AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
293- # target_compile_options(test_xtensor_lib PRIVATE -ftrivial-auto-var-init=zero)
294- # endif()
295- # if(USE_SANITIZER MATCHES "memory")
296- # target_compile_options(test_xtensor_lib PRIVATE -fno-sanitize=memory)
297- # target_link_options(test_xtensor_lib PRIVATE -fno-sanitize=memory)
298- # endif()
299301
300302target_include_directories (test_xtensor_lib PRIVATE ${XTENSOR_INCLUDE_DIR} )
301303target_link_libraries (test_xtensor_lib PRIVATE xtensor doctest::doctest ${CMAKE_THREAD_LIBS_INIT} )
Original file line number Diff line number Diff line change 1+ src:*doctest/doctest.h
You can’t perform that action at this time.
0 commit comments