From ab589043670145c95ff372021bab19464b6036e2 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 4 May 2012 14:02:35 +0200 Subject: Fix FreeBSD test errors. Also link with libexecinfo on FreeBSD for stacktrace functionality. --- cmake/os/FreeBSD.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cmake/os/FreeBSD.cmake') diff --git a/cmake/os/FreeBSD.cmake b/cmake/os/FreeBSD.cmake index 9bc7d944da2..27afe679f25 100644 --- a/cmake/os/FreeBSD.cmake +++ b/cmake/os/FreeBSD.cmake @@ -23,6 +23,15 @@ # The below was used for really old versions of FreeBSD, roughly: before 5.1.9 # ADD_DEFINITIONS(-DHAVE_BROKEN_REALPATH) +# Find libexecinfo (library that contains backtrace_symbols etc) +INCLUDE_DIRECTORIES(/usr/local/include) +SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} /usr/local/include ) +SET(ENV{LIB} "$ENV{LIB}:/usr/local/lib") +FIND_LIBRARY(EXECINFO NAMES execinfo) +IF(EXECINFO) + SET(LIBEXECINFO ${EXECINFO}) +ENDIF() + # Use atomic builtins IF(CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "i386") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686") -- cgit v1.2.1