summaryrefslogtreecommitdiff
path: root/thirdparty/libbacktrace
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2013-05-29 14:52:01 +0100
committerJosé Fonseca <jfonseca@vmware.com>2013-05-29 14:52:01 +0100
commit080137233ad172039d4fe5145c4e475e90d731fd (patch)
treecaf3c30e7cbf49fd44c8e38b296e095a9394b9be /thirdparty/libbacktrace
parent02f5bc034fde68a167500e33c93ddbdda8e175f3 (diff)
libbacktrace: Tweak the CMakeLists.txt
Diffstat (limited to 'thirdparty/libbacktrace')
-rw-r--r--thirdparty/libbacktrace/CMakeLists.txt18
1 files changed, 13 insertions, 5 deletions
diff --git a/thirdparty/libbacktrace/CMakeLists.txt b/thirdparty/libbacktrace/CMakeLists.txt
index 0902f444..d6b4e108 100644
--- a/thirdparty/libbacktrace/CMakeLists.txt
+++ b/thirdparty/libbacktrace/CMakeLists.txt
@@ -52,8 +52,6 @@ if (FLAG_UNWIND_TABLES)
add_definitions ("-funwind-tables")
endif ()
-add_definitions ("-fPIC")
-
# Adjust warnings
if (CMAKE_COMPILER_IS_GNUCC)
add_definitions ("-Wno-switch -Wno-enum-compare")
@@ -103,7 +101,7 @@ else ()
set (BACKTRACE_USES_MALLOC 0)
endif ()
-add_definitions ("-D_GNU_SOURCE")
+add_definitions (-D_GNU_SOURCE)
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE)
check_symbol_exists (dl_iterate_phdr link.h HAVE_DL_ITERATE_PHDR)
@@ -130,8 +128,18 @@ include_directories (
auxincl
)
add_library (backtrace STATIC EXCLUDE_FROM_ALL
- ${BACKTRACE_FILE} ${FORMAT_FILE} ${VIEW_FILE} ${ALLOC_FILE}
- fileline.c posix.c print.c state.c)
+ ${BACKTRACE_FILE}
+ ${FORMAT_FILE}
+ ${VIEW_FILE}
+ ${ALLOC_FILE}
+ fileline.c
+ posix.c
+ print.c
+ state.c
+)
+set_target_properties (backtrace PROPERTIES
+ COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}"
+)
set (ENABLE_LIBBACKTRACE_TEST false CACHE BOOL "Enable libbacktrace testing")
if (ENABLE_LIBBACKTRACE_TEST)