Skip to content

Commit

Permalink
more robust patching
Browse files Browse the repository at this point in the history
  • Loading branch information
tkonolige committed Feb 1, 2021
1 parent c1e71c3 commit be07941
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmake/modules/Libbacktrace.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ ExternalProject_Add(project_libbacktrace

# Only rebuild libbacktrace if this file changes
# libbacktrace has a bug on macOS with shared libraries, so we patch it here
ExternalProject_Add_Step(project_libbacktrace update-new
ExternalProject_Add_Step(project_libbacktrace checkout
DEPENDERS configure
DEPENDEES download
DEPENDS "${CMAKE_CURRENT_LIST_DIR}/Libbacktrace.cmake" "${CMAKE_CURRENT_LIST_DIR}/libbacktrace_macos.patch"
COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/libbacktrace/src/project_libbacktrace; git checkout -f ${TAG};
git apply ${CMAKE_CURRENT_LIST_DIR}/libbacktrace_macos.patch
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/libbacktrace/src/project_libbacktrace
COMMAND git checkout -f ${TAG};
COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/libbacktrace_macos.patch
COMMENT "update and patch"
)

add_library(libbacktrace STATIC IMPORTED)
Expand Down

0 comments on commit be07941

Please sign in to comment.