Add option to explicitly avoid using execinfo for backtraces

backtrace(3) from libexecinfo in musl will run into crash [1].

Provide an option to disable it explicitly even if libexecinfo is
present.

1: https://www.openwall.com/lists/musl/2021/07/17/1
This commit is contained in:
Đoàn Trần Công Danh
2021-07-18 16:32:38 +07:00
committed by Brad King
parent 0615aeffbf
commit aa4c30182b

View File

@@ -361,6 +361,9 @@ macro (CMAKE_BUILD_UTILITIES)
if(CMake_NO_CXX_STANDARD)
set(KWSYS_CXX_STANDARD "")
endif()
if(CMake_NO_SELF_BACKTRACE)
set(KWSYS_NO_EXECINFO 1)
endif()
if(WIN32)
# FIXME: Teach KWSys to hard-code these checks on Windows.
set(KWSYS_C_HAS_CLOCK_GETTIME_MONOTONIC_COMPILED 0)