[CMake] Cleanup TableGen include flags
authorChris Bieneman <beanz@apple.com>
Tue, 6 Dec 2016 04:45:11 +0000 (04:45 +0000)
committerChris Bieneman <beanz@apple.com>
Tue, 6 Dec 2016 04:45:11 +0000 (04:45 +0000)
commit1b5f563a612ba1dd3142bd32623767fa03365922
treeaf7f89b40ee1503c8db5c1035f980f7d5c29270d
parent21e53508b63c3192d293dff806b26771d100f214
[CMake] Cleanup TableGen include flags

It is kinda crazy to have llvm/include and llvm/lib/Target in the include path for every tablegen invocation for every tablegen-like tool.

This patch removes those flags from the tablgen function that is called everywhere by instead creating a variable LLVM_TABLEGEN_FLAGS which is setup in the LLVM source directories.

This removes TableGen.cmake's dependency on LLVM_MAIN_SRC_DIR, and LLVM_MAIN_INCLUDE_DIR.

llvm-svn: 288770
llvm/CMakeLists.txt
llvm/cmake/modules/TableGen.cmake
llvm/lib/Target/CMakeLists.txt