summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--lib/StaticAnalyzer/Checkers/CMakeLists.txt4
2 files changed, 1 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4189739521..fb5933fd95 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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}")
diff --git a/lib/StaticAnalyzer/Checkers/CMakeLists.txt b/lib/StaticAnalyzer/Checkers/CMakeLists.txt
index c96b42db1e..8c1f91f0c2 100644
--- a/lib/StaticAnalyzer/Checkers/CMakeLists.txt
+++ b/lib/StaticAnalyzer/Checkers/CMakeLists.txt
@@ -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