]> granicus.if.org Git - clang/commitdiff
Add current binary and source directories to the header search list
authorOscar Fuentes <ofv@wanadoo.es>
Mon, 14 Feb 2011 20:14:11 +0000 (20:14 +0000)
committerOscar Fuentes <ofv@wanadoo.es>
Mon, 14 Feb 2011 20:14:11 +0000 (20:14 +0000)
for all compiler invocations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125514 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
lib/StaticAnalyzer/Checkers/CMakeLists.txt

index 4189739521ceab2770ea8e563998df804bd7081d..fb5933fd95dc405c250b37fd00a17e5a16140ca8 100644 (file)
@@ -38,6 +38,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
   set(LLVM_MAIN_INCLUDE_DIR "${LLVM_MAIN_SRC_DIR}/include")
   set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR})
 
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
   include_directories("${PATH_TO_LLVM_BUILD}/include" "${LLVM_MAIN_INCLUDE_DIR}")
   if( NOT PATH_TO_LLVM_BUILD STREQUAL LLVM_MAIN_SRC_DIR )
     include_directories("${LLVM_MAIN_INCLUDE_DIR}")
index c96b42db1eaf4dd4620fc2ccf6db5ea2defb8290..8c1f91f0c27e06afb57e5285109497fec435f6da 100644 (file)
@@ -5,10 +5,6 @@ tablegen(Checkers.inc
 add_custom_target(ClangSACheckers
   DEPENDS Checkers.inc)
 
-# So 'Checkers.inc' can be included from the cmake build directory.
-# FIXME: Someone more familiar with cmake should enable this for all of LLVM.
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I ${CMAKE_CURRENT_BINARY_DIR}")
-
 set(LLVM_USED_LIBS clangBasic clangAST)
 
 add_clang_library(clangStaticAnalyzerCheckers