]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: use FindBacktrace instead of Findexecinfo
authorKefu Chai <kchai@redhat.com>
Wed, 20 Jul 2016 06:13:40 +0000 (14:13 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 20 Jul 2016 06:47:52 +0000 (14:47 +0800)
always better to use upstream cmake modules.

Signed-off-by: Kefu Chai <kchai@redhat.com>
CMakeLists.txt
cmake/modules/Findexecinfo.cmake [deleted file]
src/CMakeLists.txt

index 95e41fd6e7353e249e26c17ddf7171c358ff07ab..f149069efc18fb6b25ea5bb1934f15ba566b702c 100644 (file)
@@ -152,7 +152,7 @@ else(ENABLE_SHARED)
 endif(ENABLE_SHARED)
 set(CMAKE_POSITION_INDEPENDENT_CODE ${ENABLE_SHARED})
 
-find_package(execinfo)
+find_package(Backtrace)
 
 find_package(udev REQUIRED)
 set(HAVE_UDEV ${UDEV_FOUND})
diff --git a/cmake/modules/Findexecinfo.cmake b/cmake/modules/Findexecinfo.cmake
deleted file mode 100644 (file)
index c6bf7c8..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# - Find execinfo
-# Find the execinfo headers and libraries.
-#
-#  EXECINFO_INCLUDE_DIRS - where to find execinfo.h, etc.
-#  EXECINFO_LIBRARIES    - List of libraries when using execinfo.
-#  EXECINFO_FOUND        - True if execinfo found.
-
-# Look for the header file.
-FIND_PATH(EXECINFO_INCLUDE_DIR NAMES execinfo.h)
-
-# Look for the library.
-FIND_LIBRARY(EXECINFO_LIBRARY NAMES execinfo)
-
-# handle the QUIETLY and REQUIRED arguments and set EXECINFO_FOUND to TRUE if
-# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(execinfo DEFAULT_MSG EXECINFO_LIBRARY EXECINFO_INCLUDE_DIR)
-
-# Copy the results to the output variables.
-IF(EXECINFO_FOUND)
-  SET(EXECINFO_LIBRARIES ${EXECINFO_LIBRARY})
-  SET(EXECINFO_INCLUDE_DIRS ${EXECINFO_INCLUDE_DIR})
-ELSE(EXECINFO_FOUND)
-  SET(EXECINFO_LIBRARIES)
-  SET(EXECINFO_INCLUDE_DIRS)
-ENDIF(EXECINFO_FOUND)
-
-MARK_AS_ADVANCED(EXECINFO_INCLUDE_DIR EXECINFO_LIBRARY)
index b08b3b2f87ee12495a8724325fd50d1e42dc3e85..24f2a2446f64be7e1a9bb545442e30593ea4f025 100644 (file)
@@ -511,7 +511,7 @@ endif(${HAVE_ARMV8_CRC})
 
 add_library(common_utf8 STATIC common/utf8.c)
 
-target_link_libraries(common json_spirit common_utf8 erasure_code rt uuid resolv ${CRYPTO_LIBS} ${Boost_LIBRARIES} ${BLKID_LIBRARIES} ${EXECINFO_LIBRARIES})
+target_link_libraries(common json_spirit common_utf8 erasure_code rt uuid resolv ${CRYPTO_LIBS} ${Boost_LIBRARIES} ${BLKID_LIBRARIES} ${Backtrace_LIBRARIES})
 
 if(${WITH_LTTNG})
   add_subdirectory(tracing)