3 Commits

Author SHA1 Message Date
8aba39c955 optional stack trace support
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-26 09:23:21 -05:00
68a5f90715 added cpptrace 2024-07-26 08:07:10 -05:00
f3dfadddfa added cpptrace 2024-07-26 07:54:29 -05:00
5 changed files with 43 additions and 0 deletions

View File

@ -16,6 +16,7 @@ cppcoreguidelines
cppdbg
cppflags
cpphttplib
cpptrace
cppvsdbg
cstdint
cxxflags
@ -29,6 +30,9 @@ dcli11_warnings_as_errors
dcmake_cxx_flags
dcpphttplib_openssl_support
dcpphttplib_tcp_nodelay
dcpptrace_static_define
dcpptrace_unwind_with_execinfo
dcpptrace_unwind_with_libunwind
dcurl_ca_bundle
dcurl_ca_fallback
dcurl_disable_ldap
@ -65,6 +69,7 @@ drocksdb_install_on_windows
dshared
dspdlog_fmt_external
dthreads_prefer_pthread_flag
dunw_local_only
duse_libidn2
duuid_build_tests
dwith_benchmark

View File

@ -14,6 +14,7 @@ RUN apk add \
bzip2-static \
cmake \
diffutils \
elfutils-dev \
fontconfig-dev \
fontconfig-static \
freetype \

View File

@ -14,6 +14,7 @@ RUN apk add \
bzip2-static \
cmake \
diffutils \
elfutils-dev \
fontconfig-dev \
fontconfig-static \
freetype \

View File

@ -1,3 +1,31 @@
if (NOT PROJECT_STATIC_LINK)
if(PROJECT_IS_MINGW)
add_definitions(-DCPPTRACE_UNWIND_WITH_DBGHELP)
else()
add_definitions(-DCPPTRACE_UNWIND_WITH_UNWIND)
endif()
include(FetchContent)
FetchContent_Declare(
cpptrace
GIT_REPOSITORY https://github.com/jeremy-rifkin/cpptrace.git
GIT_TAG v0.6.3
)
FetchContent_MakeAvailable(cpptrace)
if(WIN32)
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:cpptrace::cpptrace>
$<TARGET_FILE_DIR:your_target>
)
endif()
link_libraries(cpptrace::cpptrace)
endif()
set(CMAKE_CXX_FLAGS "-include common.hpp ${CMAKE_CXX_FLAGS}")
add_project_library(lib${PROJECT_NAME} "" "" "${PROJECT_ADDITIONAL_SOURCES}")

View File

@ -19,6 +19,10 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#if !defined(PROJECT_STATIC_LINK)
#include "cpptrace/cpptrace.hpp"
#endif
#include "cli/actions.hpp"
#include "initialize.hpp"
#include "types/repertory.hpp"
@ -28,6 +32,10 @@
using namespace repertory;
auto main(int argc, char **argv) -> int {
#if !defined(PROJECT_STATIC_LINK)
cpptrace::register_terminate_handler();
#endif
if (not repertory::project_initialize()) {
return -1;
}