From: Jan Henke Date: Tue, 24 Mar 2015 15:24:16 +0000 (+0000) Subject: Force /usr/local/include as search path on FreeBSD X-Git-Tag: accepted/tizen/base/20180629.140029~6937^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c6e325899bcdc2bb3f0feb1179f1ad3bef10d91;p=platform%2Fupstream%2Fcoreclr.git Force /usr/local/include as search path on FreeBSD CMake does not find headers installed in /usr/local/include by default. On FreeBSD this is the default location for libunwind.h though. Define CMAKE_REQUIERED_INCLUDE to include both /usr/local/include and /usr/include. This change only affects FreeBSD. Also FreeBSD (like Darwin) does not work with _DEFAULT_SOURCE or _POSIX_C_SOURCE defined. Closes #547 --- diff --git a/src/pal/src/configure.cmake b/src/pal/src/configure.cmake index 28f6ff8..c7b7f33 100644 --- a/src/pal/src/configure.cmake +++ b/src/pal/src/configure.cmake @@ -6,7 +6,9 @@ include(CheckIncludeFiles) include(CheckStructHasMember) include(CheckTypeSize) -if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) +if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD) + set(CMAKE_REQUIRED_INCLUDES "/usr/local/include" "/usr/include") +elseif(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) set(CMAKE_REQUIRED_DEFINITIONS "-D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L") endif() check_include_files(ieeefp.h HAVE_IEEEFP_H)