summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-12-06 04:45:11 +0000
committerChris Bieneman <beanz@apple.com>2016-12-06 04:45:11 +0000
commitdfe568d76602287abdf7253d64b5c4d8b61132e1 (patch)
tree0113b7020d6a274040c8c9122684397b9662fbc8 /CMakeLists.txt
parent7c651d6dd2fc3ed37e33fa6ae4614c6a697e0258 (diff)
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288770 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f209338e2c18..08008f9f2277 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -803,6 +803,8 @@ endif()
include(AddLLVM)
include(TableGen)
+set(LLVM_TABLEGEN_FLAGS -I ${LLVM_MAIN_INCLUDE_DIR})
+
if( MINGW )
# People report that -O3 is unreliable on MinGW. The traditional
# build also uses -O2 for that reason: