mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Cmake build: Re-enable address sanitizer
Moved code because: 1.) Setting of LYX_CXX_FLAGS only has no effect, 2.) and setting of CMAKE_CXX_FLAGS was to late.
This commit is contained in:
parent
3b6fec3835
commit
5529172fa1
@ -711,6 +711,16 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LYX_ASAN)
|
||||
set(CMAKE_CXX_FLAGS "-fsanitize=address -fno-omit-frame-pointer -g ${CMAKE_CXX_FLAGS}")
|
||||
message(STATUS)
|
||||
message(STATUS "Address sanitizer enabled. Usage:")
|
||||
message(STATUS " wget https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py")
|
||||
message(STATUS " chmod +x ./asan_symbolize.py")
|
||||
message(STATUS " ./bin/${_lyx} 2>&1 | ./asan_symbolize.py | c++filt ")
|
||||
message(STATUS)
|
||||
endif()
|
||||
|
||||
set(LYX_CXX_FLAGS_EXTRA "" CACHE STRING "Desired semicolon separated list of extra cxx compile flags, like '-Werror'")
|
||||
mark_as_advanced(LYX_CXX_FLAGS_EXTRA)
|
||||
if(LYX_CXX_FLAGS_EXTRA)
|
||||
@ -1168,16 +1178,6 @@ endif ()
|
||||
add_custom_target (lyx_run_tests COMMAND ${cmd})
|
||||
set_target_properties(lyx_run_tests PROPERTIES FOLDER "tests")
|
||||
|
||||
if(LYX_ASAN)
|
||||
set(LYX_CXX_FLAGS "-fsanitize=address -fno-omit-frame-pointer -g")
|
||||
message(STATUS)
|
||||
message(STATUS "Address sanitizer enabled. Usage:")
|
||||
message(STATUS " wget https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py")
|
||||
message(STATUS " chmod +x ./asan_symbolize.py")
|
||||
message(STATUS " ./bin/lyx2.2 2>&1 | ./asan_symbolize.py | c++filt ")
|
||||
message(STATUS)
|
||||
endif()
|
||||
|
||||
if(LYX_INSTALL)
|
||||
if(${LYX_PYTHON_EXECUTABLE} MATCHES "-NOTFOUND")
|
||||
message(STATUS "Python required to create doc!")
|
||||
|
Loading…
Reference in New Issue
Block a user