File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Options/include/igc/Options Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 23
23
#============================ end_copyright_notice =============================
24
24
25
25
set (LLVM_TARGET_DEFINITIONS Options .td )
26
- tablegen (LLVM Options .inc -gen-opt-parser-defs )
26
+ igc_tablegen (LLVM Options .inc -gen-opt-parser-defs )
27
27
add_public_tablegen_target (IGCOptionsTablegen )
Original file line number Diff line number Diff line change @@ -89,3 +89,13 @@ macro(igc_find_external_lit)
89
89
message (FATAL_ERROR "llvm-lit is not found, please specify it with LLVM_EXTERNAL_LIT variable" )
90
90
endif ()
91
91
endmacro ()
92
+
93
+ # Helper macro to add tablegenning and set
94
+ # include flags for current directories.
95
+ macro (igc_tablegen )
96
+ set (_old_flags ${LLVM_TABLEGEN_FLAGS} )
97
+ list (APPEND LLVM_TABLEGEN_FLAGS "-I=${CMAKE_CURRENT_SOURCE_DIR} " "-I=${CMAKE_CURRENT_BINARY_DIR} " )
98
+ tablegen (${ARGN} )
99
+ set (LLVM_TABLEGEN_FLAGS ${_old_flags} )
100
+ unset (_old_flags )
101
+ endmacro ()
You can’t perform that action at this time.
0 commit comments