Skip to content

Commit

Permalink
libbacktrace: Re-import as a git submodule.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfonseca committed Apr 18, 2021
1 parent cff3cc5 commit b1c99db
Show file tree
Hide file tree
Showing 33 changed files with 11 additions and 15,325 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
path = thirdparty/gtest
url = https://github.com/google/googletest
shallow = true
[submodule "thirdparty/libbacktrace"]
path = thirdparty/libbacktrace
url = https://github.com/ianlancetaylor/libbacktrace
shallow = true
[submodule "thirdparty/libpng"]
path = thirdparty/libpng
url = https://github.com/apitrace/libpng
Expand Down
1 change: 1 addition & 0 deletions thirdparty/libbacktrace
Submodule libbacktrace added at dedbe1
10 changes: 6 additions & 4 deletions thirdparty/libbacktrace.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ endif ()

check_include_file ("stdint.h" HAVE_STDINT_H)

configure_file (libbacktrace/backtrace-supported.h.in libbacktrace/backtrace-supported.h)
configure_file (libbacktrace/backtrace-supported.h.in support/libbacktrace/backtrace-supported.h)

configure_file (support/libbacktrace/config.h.in libbacktrace/config.h)
configure_file (support/libbacktrace/config.h.in support/libbacktrace/config.h)

add_convenience_library (backtrace EXCLUDE_FROM_ALL
${BACKTRACE_FILE}
Expand All @@ -167,13 +167,14 @@ add_convenience_library (backtrace EXCLUDE_FROM_ALL
libbacktrace/testlib.c
)
target_include_directories (backtrace
PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/libbacktrace ${CMAKE_CURRENT_SOURCE_DIR}/libbacktrace
PRIVATE support/libbacktrace
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/support/libbacktrace
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/libbacktrace
)
target_link_libraries (backtrace PUBLIC ${CMAKE_DL_LIBS})

add_executable (btest libbacktrace/btest.c)
set_target_properties (btest PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS_DEBUG}")
target_include_directories (btest PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/support/libbacktrace)
target_link_libraries (btest backtrace)
add_dependencies (check btest)
add_test (
Expand All @@ -186,6 +187,7 @@ add_test (

add_executable (stest libbacktrace/stest.c)
set_target_properties (stest PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS_DEBUG}")
target_include_directories (stest PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/support/libbacktrace)
target_link_libraries (stest backtrace)
add_dependencies (check stest)
add_test (NAME libbacktrace_stest COMMAND stest)
3 changes: 0 additions & 3 deletions thirdparty/libbacktrace/.editorconfig

This file was deleted.

0 comments on commit b1c99db

Please sign in to comment.