1 2# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 3# 4# This program is free software; you can redistribute it and/or modify 5# it under the terms of the GNU General Public License as published by 6# the Free Software Foundation; version 2 of the License. 7# 8# This program is distributed in the hope that it will be useful, 9# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# GNU General Public License for more details. 12# 13# You should have received a copy of the GNU General Public License 14# along with this program; if not, write to the Free Software 15# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA 16 17# This file includes FreeBSD specific options and quirks, related to system checks 18 19# Should not be needed any more, but kept for easy resurrection if needed 20# #Legacy option, maybe not needed anymore , taken as is from autotools build 21# ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000) 22 23# The below was used for really old versions of FreeBSD, roughly: before 5.1.9 24# ADD_DEFINITIONS(-DHAVE_BROKEN_REALPATH) 25 26# Find libexecinfo (library that contains backtrace_symbols etc) 27SET(EXECINFO_ROOT /usr/local CACHE INTERNAL "Where to find execinfo library and header") 28INCLUDE_DIRECTORIES(${EXECINFO_ROOT}/include) 29SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${EXECINFO_ROOT}/include) 30SET(ENV{LIB} "$ENV{LIB}:${EXECINFO_ROOT}/lib") 31FIND_LIBRARY(EXECINFO NAMES execinfo) 32IF(EXECINFO) 33 SET(LIBEXECINFO ${EXECINFO}) 34ENDIF() 35 36