aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-16 23:06:59 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-16 23:06:59 +0000
commita393e9eedcc28b25f521a4feceb3b56e3d0d360f (patch)
tree666937547a17f428a2bcbaebc8a82c97798871dd /include/clang
parent8c84417776e57d58ab573b2f4c485e67cb68d996 (diff)
Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and then revert. Major differences are: - We don't remove or use the current ".def" files. Instead, for now, we just make sure that we're building the ".inc" files. - Fixed CMake makefiles to run TableGen and build the ".inc" files when needed. Tested with both the Xcode and Makefile generators provided by CMake, so it should be solid. - Fixed normal makefiles to handle out-of-source builds that involve the ".inc" files. I'll send a separate patch to the list with Sebastian's changes that eliminate the use of the .def files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67058 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Basic/CMakeLists.txt16
-rw-r--r--include/clang/Basic/Makefile9
-rw-r--r--include/clang/CMakeLists.txt1
-rw-r--r--include/clang/Makefile4
4 files changed, 30 insertions, 0 deletions
diff --git a/include/clang/Basic/CMakeLists.txt b/include/clang/Basic/CMakeLists.txt
new file mode 100644
index 0000000000..9d6e14f85d
--- /dev/null
+++ b/include/clang/Basic/CMakeLists.txt
@@ -0,0 +1,16 @@
+macro(clang_diag_gen component)
+ tablegen(Diagnostic${component}Kinds.inc
+ -gen-clang-diags-defs -clang-component=${component})
+ add_custom_target(ClangDiagnostic${component}
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Diagnostic${component}Kinds.inc)
+endmacro(clang_diag_gen)
+
+set(LLVM_TARGET_DEFINITIONS Diagnostic.td)
+clang_diag_gen(Analysis)
+clang_diag_gen(AST)
+clang_diag_gen(Common)
+clang_diag_gen(Driver)
+clang_diag_gen(Frontend)
+clang_diag_gen(Lex)
+clang_diag_gen(Parse)
+clang_diag_gen(Sema) \ No newline at end of file
diff --git a/include/clang/Basic/Makefile b/include/clang/Basic/Makefile
new file mode 100644
index 0000000000..39193111b3
--- /dev/null
+++ b/include/clang/Basic/Makefile
@@ -0,0 +1,9 @@
+LEVEL = ../../../../..
+BUILT_SOURCES = DiagnosticAnalysisKinds.inc DiagnosticASTKinds.inc \
+ DiagnosticCommonKinds.inc DiagnosticDriverKinds.inc \
+ DiagnosticFrontendKinds.inc DiagnosticLexKinds.inc \
+ DiagnosticParseKinds.inc DiagnosticSemaKinds.inc
+
+CLANG_BUILD_DIAGNOSTICS_INC = 1
+
+include $(LEVEL)/Makefile.common
diff --git a/include/clang/CMakeLists.txt b/include/clang/CMakeLists.txt
new file mode 100644
index 0000000000..39e3698a16
--- /dev/null
+++ b/include/clang/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(Basic)
diff --git a/include/clang/Makefile b/include/clang/Makefile
new file mode 100644
index 0000000000..82a16d53ea
--- /dev/null
+++ b/include/clang/Makefile
@@ -0,0 +1,4 @@
+LEVEL = ../../../..
+DIRS := Basic
+
+include $(LEVEL)/Makefile.common