summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commit9d5235d527994a531c31e4eca30392daa964806c (patch)
tree0cf707e24d11f7bd8fcd7cedcfaca118d2e42a84 /clang/lib
parent65f57fe6ea9cfccc3259d2d3025688eeab25b31a (diff)
downloadbcm5719-llvm-9d5235d527994a531c31e4eca30392daa964806c.tar.gz
bcm5719-llvm-9d5235d527994a531c31e4eca30392daa964806c.zip
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! llvm-svn: 125758
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h2
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/CMakeLists.txt2
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/Makefile2
3 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h b/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h
index 51cad5bc83e..b01b0f4c544 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h
+++ b/clang/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/clang/lib/StaticAnalyzer/Frontend/CMakeLists.txt b/clang/lib/StaticAnalyzer/Frontend/CMakeLists.txt
index 505c0cf4402..cf47c47dad1 100644
--- a/clang/lib/StaticAnalyzer/Frontend/CMakeLists.txt
+++ b/clang/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/clang/lib/StaticAnalyzer/Frontend/Makefile b/clang/lib/StaticAnalyzer/Frontend/Makefile
index 1e6561e555b..2698120d909 100644
--- a/clang/lib/StaticAnalyzer/Frontend/Makefile
+++ b/clang/lib/StaticAnalyzer/Frontend/Makefile
@@ -14,4 +14,6 @@
CLANG_LEVEL := ../../..
LIBRARYNAME := clangStaticAnalyzerFrontend
+CPP.Flags += -I${PROJ_OBJ_DIR}/../Checkers
+
include $(CLANG_LEVEL)/Makefile
OpenPOWER on IntegriCloud