Commit 6aecd684 authored by Mohamed Bassem's avatar Mohamed Bassem Committed by Facebook Github Bot

Find the backtrace function using find_package instead of check_function_exists

Summary: When building folly with clang, backtrace was marked as not found. This diff uses `find_package(Backtrace)` instead which allowed us to use the symbolizer libs.

Reviewed By: simpkins

Differential Revision: D19497120

fbshipit-source-id: a8f8b4ffe9a2d53a53b6c7be32ac2a832a840877
parent f656e771
......@@ -136,7 +136,8 @@ if (UNWIND_LIBRARIES)
list(APPEND FOLLY_LINK_LIBRARIES ${UNWIND_LIBRARIES})
list(APPEND CMAKE_REQUIRED_LIBRARIES ${UNWIND_LIBRARIES})
endif()
check_function_exists(backtrace FOLLY_HAVE_BACKTRACE)
find_package(Backtrace)
set(FOLLY_HAVE_BACKTRACE ${Backtrace_FOUND})
if (FOLLY_HAVE_ELF_H AND FOLLY_HAVE_BACKTRACE AND LIBDWARF_FOUND)
set(FOLLY_USE_SYMBOLIZER ON)
endif()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment