Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native Branch: cpptrace fix #2768

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 31 additions & 17 deletions dep/cpptrace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -414,36 +414,50 @@ if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF)
find_package(zstd)
else()
cmake_policy(SET CMP0074 NEW)
set(ZSTD_BUILD_PROGRAMS OFF)
set(ZSTD_BUILD_CONTRIB OFF)
set(ZSTD_BUILD_TESTS OFF)
set(ZSTD_BUILD_STATIC ON)
set(ZSTD_BUILD_SHARED OFF)
set(ZSTD_LEGACY_SUPPORT OFF)
FetchContent_Declare(
zstd
URL "${CPPTRACE_ZSTD_URL}"
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
GIT_REPOSITORY ${CPPTRACE_ZSTD_REPO}
GIT_TAG ${CPPTRACE_ZSTD_TAG}
GIT_SHALLOW ${CPPTRACE_ZSTD_SHALLOW}
SOURCE_SUBDIR build/cmake
)
FetchContent_MakeAvailable(zstd)
# FetchContent_MakeAvailable(zstd)
FetchContent_GetProperties(zstd)
if(NOT zstd_POPULATED)
FetchContent_Populate(zstd)
set(ZSTD_BUILD_PROGRAMS OFF)
set(ZSTD_BUILD_CONTRIB OFF)
set(ZSTD_BUILD_TESTS OFF)
set(ZSTD_BUILD_STATIC ON)
set(ZSTD_BUILD_SHARED OFF)
set(ZSTD_LEGACY_SUPPORT OFF)
add_subdirectory("${zstd_SOURCE_DIR}/build/cmake" "${zstd_BINARY_DIR}")
endif()
endif()
# Libdwarf itself
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
set(PIC_ALWAYS TRUE)
set(BUILD_DWARFDUMP FALSE)
# set(PIC_ALWAYS TRUE)
# set(BUILD_DWARFDUMP FALSE)
FetchContent_Declare(
libdwarf
GIT_REPOSITORY ${CPPTRACE_LIBDWARF_REPO}
GIT_TAG ${CPPTRACE_LIBDWARF_TAG}
GIT_SHALLOW ${CPPTRACE_LIBDWARF_SHALLOW}
)
FetchContent_MakeAvailable(libdwarf)
target_include_directories(
dwarf
PRIVATE
${zstd_SOURCE_DIR}/lib
)
# FetchContent_MakeAvailable(libdwarf)
FetchContent_GetProperties(libdwarf)
if(NOT libdwarf_POPULATED)
set(PIC_ALWAYS TRUE)
set(BUILD_DWARFDUMP FALSE)
# set(ENABLE_DECOMPRESSION FALSE)
FetchContent_Populate(libdwarf)
add_subdirectory("${libdwarf_SOURCE_DIR}" "${libdwarf_BINARY_DIR}")
target_include_directories(
dwarf
PRIVATE
${zstd_SOURCE_DIR}/lib
)
endif()
endif()
if(CPPTRACE_CONAN)
target_link_libraries(${target_name} PRIVATE libdwarf::libdwarf)
Expand Down
4 changes: 2 additions & 2 deletions dep/cpptrace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
It is used in MaNGOS to print the stack trace on failure.

## Source
Commit: https://github.com/jeremy-rifkin/cpptrace/commit/4ed90c1585501f99a492f296a7f177503218f235
Date: 2024-09-13T05:42:17Z
Commit: https://github.com/jeremy-rifkin/cpptrace/commit/142e0b9ea48d2067d031a992a41a66042af6d207
Date: 2024-09-13T05:06:05Z

## Copied files
```
Expand Down
1 change: 0 additions & 1 deletion dep/cpptrace/cmake/InstallRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ install(
COMPONENT ${package_name}-development
INCLUDES #
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)

# create config file that points to targets file
Expand Down
4 changes: 3 additions & 1 deletion dep/cpptrace/cmake/OptionVariables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ option(CPPTRACE_SKIP_UNIT "" OFF)
option(CPPTRACE_STD_FORMAT "" ON)
option(CPPTRACE_UNPREFIXED_TRY_CATCH "" OFF)
option(CPPTRACE_USE_EXTERNAL_GTEST "" OFF)
set(CPPTRACE_ZSTD_URL "https://github.com/facebook/zstd/releases/download/v1.5.6/zstd-1.5.6.tar.gz" CACHE STRING "")
set(CPPTRACE_ZSTD_REPO "https://github.com/facebook/zstd.git" CACHE STRING "")
set(CPPTRACE_ZSTD_TAG "794ea1b0afca0f020f4e57b6732332231fb23c70" CACHE STRING "") # v1.5.6
set(CPPTRACE_ZSTD_SHALLOW "1" CACHE STRING "")
set(CPPTRACE_LIBDWARF_REPO "https://github.com/jeremy-rifkin/libdwarf-lite.git" CACHE STRING "")
set(CPPTRACE_LIBDWARF_TAG "97fd68c6026c0237943106d6bc3e83f3661d39e8" CACHE STRING "") # v0.11.0
set(CPPTRACE_LIBDWARF_SHALLOW "1" CACHE STRING "")
Expand Down