mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[all] allow disable of backtrace support during build
This commit is contained in:
parent
d7fa0aeff9
commit
4cf6dec592
@ -14,6 +14,9 @@ if(OPTIMIZE_FOR_NATIVE)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(ENABLE_BACKTRACE "Enable backtrace support on crash" ON)
|
||||||
|
add_feature_info(ENABLE_BACKTRACE ENABLE_BACKTRACE "Backtrace support.")
|
||||||
|
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
"-Wall"
|
"-Wall"
|
||||||
"-Werror"
|
"-Werror"
|
||||||
|
@ -24,6 +24,9 @@ add_feature_info(ENABLE_EGL ENABLE_EGL "EGL renderer.")
|
|||||||
option(ENABLE_CB_X11 "Enable X11 clipboard integration" ON)
|
option(ENABLE_CB_X11 "Enable X11 clipboard integration" ON)
|
||||||
add_feature_info(ENABLE_CB_X11 ENABLE_CB_X11 "X11 Clipboard Integration.")
|
add_feature_info(ENABLE_CB_X11 ENABLE_CB_X11 "X11 Clipboard Integration.")
|
||||||
|
|
||||||
|
option(ENABLE_BACKTRACE "Enable backtrace support on crash" ON)
|
||||||
|
add_feature_info(ENABLE_BACKTRACE ENABLE_BACKTRACE "Backtrace support.")
|
||||||
|
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
"-Wall"
|
"-Wall"
|
||||||
"-Werror"
|
"-Werror"
|
||||||
|
@ -5,6 +5,10 @@ include_directories(
|
|||||||
${PROJECT_SOURCE_DIR}/include
|
${PROJECT_SOURCE_DIR}/include
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(ENABLE_BACKTRACE)
|
||||||
|
add_definitions(-DENABLE_BACKTRACE)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(COMMON_SOURCES
|
set(COMMON_SOURCES
|
||||||
src/stringutils.c
|
src/stringutils.c
|
||||||
src/stringlist.c
|
src/stringlist.c
|
||||||
@ -27,8 +31,10 @@ if(WIN32)
|
|||||||
else()
|
else()
|
||||||
set(SOURCES ${COMMON_SOURCES} ${LINUX_SOURCES})
|
set(SOURCES ${COMMON_SOURCES} ${LINUX_SOURCES})
|
||||||
add_library(lg_common STATIC ${SOURCES})
|
add_library(lg_common STATIC ${SOURCES})
|
||||||
|
if(ENABLE_BACKTRACE)
|
||||||
target_link_libraries(lg_common bfd)
|
target_link_libraries(lg_common bfd)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(lg_common
|
target_include_directories(lg_common
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
@ -21,6 +21,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
#include "common/crash.h"
|
#include "common/crash.h"
|
||||||
#include "common/debug.h"
|
#include "common/debug.h"
|
||||||
|
|
||||||
|
#if defined(ENABLE_BACKTRACE)
|
||||||
|
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -220,3 +222,12 @@ bool installCrashHandler(const char * exe)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else //ENABLE_BACKTRACE
|
||||||
|
|
||||||
|
bool installCrashHandler(const char * exe)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user