llvm.org GIT mirror llvm / dd5ff1b
Teach tablegen() macro to check needed variables This macro depends on several variables to be set in the calling context. Check them and report an error if they are not set. Without this, custom commands may be silently specified that will fail at build time. Patch by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201229 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 5 years ago
1 changed file(s) with 11 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
22 # Adds the name of the generated file to TABLEGEN_OUTPUT.
33
44 function(tablegen project ofn)
5 # Validate calling context.
6 foreach(v
7 ${project}_TABLEGEN_EXE
8 LLVM_MAIN_SRC_DIR
9 LLVM_MAIN_INCLUDE_DIR
10 )
11 if(NOT ${v})
12 message(FATAL_ERROR "${v} not set")
13 endif()
14 endforeach()
15
516 file(GLOB local_tds "*.td")
617 file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td")
718