cmake: disable stack traces by default for release builds

This commit is contained in:
Rene Guenon
2026-08-10 10:50:49 +04:00
parent ab3cb76bfb
commit 58e54bfd65
+4 -1
View File
@@ -506,7 +506,10 @@ endif()
# Can't install hook in static build on OSX, because OSX linker does not support --wrap
# On ARM, having libunwind package (with .so's only) installed breaks static link.
# When possible, avoid stack tracing using libunwind in favor of using easylogging++.
if (APPLE OR NETBSD)
if (CMAKE_BUILD_TYPE_LOWER STREQUAL "release" AND NOT STACK_TRACE)
set(DEFAULT_STACK_TRACE OFF)
set(LIBUNWIND_LIBRARIES "")
elseif (APPLE OR NETBSD)
set(DEFAULT_STACK_TRACE OFF)
set(LIBUNWIND_LIBRARIES "")
elseif (DEPENDS AND NOT LINUX)