EternalTerminal: Remove manual compile flag
Re-edited CMakeLists.txt and sources to compile with or without libexecinfo if system supports it Signed-off-by: Nathan Owens <ndowens04@gmail.com>
This commit is contained in:
parent
18c9df0722
commit
29ca1a9248
2 changed files with 19 additions and 27 deletions
|
@ -1,22 +1,22 @@
|
||||||
diff --git CMakeLists.txt CMakeLists.txt
|
diff --git CMakeLists.txt CMakeLists.txt
|
||||||
index b277dff..9ee989c 100644
|
index b277dff..ad24b56 100644
|
||||||
--- CMakeLists.txt
|
--- CMakeLists.txt
|
||||||
+++ CMakeLists.txt
|
+++ CMakeLists.txt
|
||||||
@@ -12,6 +12,12 @@ endif()
|
@@ -125,6 +125,12 @@ include_directories(
|
||||||
|
${UTEMPTER_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
option(CODE_COVERAGE "Enable code coverage" OFF)
|
+include(CheckIncludeFileCXX)
|
||||||
option(DISABLE_CRASH_LOG "Disable installing easylogging crash handler" OFF)
|
+check_include_file("execinfo.h" HAVE_EXECINFO_H)
|
||||||
+option(ENABLE_EXECINFO "Enable execinfo support" OFF)
|
+if (HAVE_EXECINFO_H)
|
||||||
+
|
+ add_definitions(-DHAVE_EXECINFO_H)
|
||||||
+if(ENABLE_EXECINFO)
|
|
||||||
+ SET(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -lexecinfo")
|
|
||||||
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_EXECINFO")
|
|
||||||
+endif()
|
+endif()
|
||||||
|
+
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DET_VERSION='\"${PROJECT_VERSION}\"'")
|
add_library(
|
||||||
# For easylogging, disable default log file, enable crash log, ensure thread safe, and catch c++ exceptions
|
et-lib
|
||||||
|
STATIC
|
||||||
diff --git external_imported/easyloggingpp/src/easylogging++.cc external_imported/easyloggingpp/src/easylogging++.cc
|
diff --git external_imported/easyloggingpp/src/easylogging++.cc external_imported/easyloggingpp/src/easylogging++.cc
|
||||||
index d763ee7..1237d9c 100644
|
index d763ee7..02e8b75 100644
|
||||||
--- external_imported/easyloggingpp/src/easylogging++.cc
|
--- external_imported/easyloggingpp/src/easylogging++.cc
|
||||||
+++ external_imported/easyloggingpp/src/easylogging++.cc
|
+++ external_imported/easyloggingpp/src/easylogging++.cc
|
||||||
@@ -2786,7 +2786,7 @@ std::ostream& operator<<(std::ostream& os, const StackTrace& st) {
|
@@ -2786,7 +2786,7 @@ std::ostream& operator<<(std::ostream& os, const StackTrace& st) {
|
||||||
|
@ -24,24 +24,20 @@ index d763ee7..1237d9c 100644
|
||||||
|
|
||||||
void StackTrace::generateNew(void) {
|
void StackTrace::generateNew(void) {
|
||||||
-#if ELPP_STACKTRACE
|
-#if ELPP_STACKTRACE
|
||||||
+#ifdef ENABLE_EXECINFO
|
+#ifdef HAVE_EXECINFO_H
|
||||||
m_stack.clear();
|
m_stack.clear();
|
||||||
void* stack[kMaxStack];
|
void* stack[kMaxStack];
|
||||||
unsigned int size = backtrace(stack, kMaxStack);
|
unsigned int size = backtrace(stack, kMaxStack);
|
||||||
diff --git external_imported/easyloggingpp/src/easylogging++.h external_imported/easyloggingpp/src/easylogging++.h
|
diff --git external_imported/easyloggingpp/src/easylogging++.h external_imported/easyloggingpp/src/easylogging++.h
|
||||||
index 688d537..b4d754e 100644
|
index 688d537..0b16966 100644
|
||||||
--- external_imported/easyloggingpp/src/easylogging++.h
|
--- external_imported/easyloggingpp/src/easylogging++.h
|
||||||
+++ external_imported/easyloggingpp/src/easylogging++.h
|
+++ external_imported/easyloggingpp/src/easylogging++.h
|
||||||
@@ -360,10 +360,10 @@ ELPP_INTERNAL_DEBUGGING_OUT_INFO << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStre
|
@@ -360,7 +360,7 @@ ELPP_INTERNAL_DEBUGGING_OUT_INFO << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStre
|
||||||
# include <codecvt>
|
# include <codecvt>
|
||||||
# endif // ELPP_OS_WINDOWS
|
# endif // ELPP_OS_WINDOWS
|
||||||
#endif // defined(ELPP_UNICODE)
|
#endif // defined(ELPP_UNICODE)
|
||||||
-#if ELPP_STACKTRACE
|
-#if ELPP_STACKTRACE
|
||||||
+#ifdef ENABLE_EXECINFO
|
+#ifdef HAVE_EXECINFO_H
|
||||||
# include <cxxabi.h>
|
# include <cxxabi.h>
|
||||||
# include <execinfo.h>
|
# include <execinfo.h>
|
||||||
-#endif // ELPP_STACKTRACE
|
#endif // ELPP_STACKTRACE
|
||||||
+#endif // ENABLE_EXECINFO
|
|
||||||
#if ELPP_OS_ANDROID
|
|
||||||
# include <sys/system_properties.h>
|
|
||||||
#endif // ELPP_OS_ANDROID
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'EternalTerminal'
|
# Template file for 'EternalTerminal'
|
||||||
pkgname=EternalTerminal
|
pkgname=EternalTerminal
|
||||||
version=6.0.5
|
version=6.0.5
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="${pkgname}-et-v${version}"
|
wrksrc="${pkgname}-et-v${version}"
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
hostmakedepends="protobuf"
|
hostmakedepends="protobuf"
|
||||||
|
@ -16,10 +16,6 @@ system_accounts="_eternal"
|
||||||
|
|
||||||
LDFLAGS="-lgflags"
|
LDFLAGS="-lgflags"
|
||||||
|
|
||||||
case "$XBPS_TARGET_LIBC" in
|
|
||||||
glibc) configure_args="-DENABLE_EXECINFO=ON";;
|
|
||||||
esac
|
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vsv etserver
|
vsv etserver
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue