summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-10-16 23:03:21 +0000
committerMatthias Braun <matze@braunis.de>2017-10-16 23:03:21 +0000
commit72af890191c3634244f7698b387fcd235ebf9387 (patch)
tree6a85a604bde71a142a80e7922ae9ed5069497741 /CMakeLists.txt
parent364dbc593b0d9275c891a735006adc6d68cab6b4 (diff)
cmake: BSD: Mark /usr/local/include as system include directory
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 <penzin.dev@gmail.com> Differential Revision: https://reviews.llvm.org/D37415 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315952 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 13dc1166b59..8d079f074c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)")