Skip to content

Commit

Permalink
cmake: BSD: Mark /usr/local/include as system include directory
Browse files Browse the repository at this point in the history
We add /usr/local/include to the include directory list for some BSD
systems. We should mark this as a system directory to avoid files from
/usr/local/include getting picked over files shipping with llvm.

This typically manifested as gtest headers installed with the system
getting picked over the ones shipping with llvm.

Patch by Petr Penzin <[email protected]>

Differential Revision: https://reviews.llvm.org/D37415

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315952 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
MatzeB committed Oct 16, 2017
1 parent 364dbc5 commit 72af890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -804,7 +804,7 @@ endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
# On FreeBSD, /usr/local/* is not used by default. In order to build LLVM
# with libxml2, iconv.h, etc., we must add /usr/local paths.
include_directories("/usr/local/include")
include_directories(SYSTEM "/usr/local/include")
link_directories("/usr/local/lib")
endif(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")

0 comments on commit 72af890

Please sign in to comment.