[llvm] r315952 - cmake: BSD: Mark /usr/local/include as system include directory

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 16:03:22 PDT 2017


Author: matze
Date: Mon Oct 16 16:03:21 2017
New Revision: 315952

URL: http://llvm.org/viewvc/llvm-project?rev=315952&view=rev
Log:
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 at gmail.com>

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

Modified:
    llvm/trunk/CMakeLists.txt

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=315952&r1=315951&r2=315952&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Mon Oct 16 16:03:21 2017
@@ -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)")
 




More information about the llvm-commits mailing list