aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-02-17 18:40:33 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-02-17 18:40:33 +0000
commitc869abe2a9deeff22f778029a7f7f75e009be03f (patch)
treec78e6771dbec3f8be39b0bf35373aead41b9fac5
parent8c99d88a6cfa14fc2edab819d5e4325c973b2809 (diff)
When building StaticAnalyzer/Frontend add -I "<Checkers build dir>" to allow Checkers.inc to be
included without '..', thus being compatible with build systems of *BSDs. Patch by Joerg Sonnenberger! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125758 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/StaticAnalyzer/Checkers/ClangSACheckers.h2
-rw-r--r--lib/StaticAnalyzer/Frontend/CMakeLists.txt2
-rw-r--r--lib/StaticAnalyzer/Frontend/Makefile2
3 files changed, 5 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Checkers/ClangSACheckers.h b/lib/StaticAnalyzer/Checkers/ClangSACheckers.h
index 51cad5bc83..b01b0f4c54 100644
--- a/lib/StaticAnalyzer/Checkers/ClangSACheckers.h
+++ b/lib/StaticAnalyzer/Checkers/ClangSACheckers.h
@@ -23,7 +23,7 @@ class ExprEngine;
#define GET_CHECKERS
#define CHECKER(FULLNAME,CLASS,CXXFILE,HELPTEXT,HIDDEN) \
void register##CLASS(ExprEngine &Eng);
-#include "../Checkers/Checkers.inc"
+#include "Checkers.inc"
#undef CHECKER
#undef GET_CHECKERS
diff --git a/lib/StaticAnalyzer/Frontend/CMakeLists.txt b/lib/StaticAnalyzer/Frontend/CMakeLists.txt
index 505c0cf440..cf47c47dad 100644
--- a/lib/StaticAnalyzer/Frontend/CMakeLists.txt
+++ b/lib/StaticAnalyzer/Frontend/CMakeLists.txt
@@ -2,6 +2,8 @@ set(LLVM_NO_RTTI 1)
set(LLVM_USED_LIBS clangBasic clangLex clangAST clangFrontend clangRewrite)
+include_directories( ${CMAKE_CURRENT_BINARY_DIR}/../Checkers )
+
add_clang_library(clangStaticAnalyzerFrontend
AnalysisConsumer.cpp
CheckerRegistration.cpp
diff --git a/lib/StaticAnalyzer/Frontend/Makefile b/lib/StaticAnalyzer/Frontend/Makefile
index 1e6561e555..2698120d90 100644
--- a/lib/StaticAnalyzer/Frontend/Makefile
+++ b/lib/StaticAnalyzer/Frontend/Makefile
@@ -14,4 +14,6 @@
CLANG_LEVEL := ../../..
LIBRARYNAME := clangStaticAnalyzerFrontend
+CPP.Flags += -I${PROJ_OBJ_DIR}/../Checkers
+
include $(CLANG_LEVEL)/Makefile