llvm.org GIT mirror llvm / 9def8b2
[CMake] Functionalize tblgen(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200149 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 6 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
11 # Extra parameters for `tblgen' may come after `ofn' parameter.
22 # Adds the name of the generated file to TABLEGEN_OUTPUT.
33
4 macro(tablegen project ofn)
4 function(tablegen project ofn)
55 file(GLOB local_tds "*.td")
66 file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td")
77
3939 set_property(DIRECTORY APPEND
4040 PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${ofn}.tmp ${ofn})
4141
42 set(TABLEGEN_OUTPUT ${TABLEGEN_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${ofn})
42 set(TABLEGEN_OUTPUT ${TABLEGEN_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${ofn} PARENT_SCOPE)
4343 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${ofn}
4444 PROPERTIES GENERATED 1)
45 endmacro(tablegen)
45 endfunction(tablegen)
4646
4747 macro(add_public_tablegen_target target)
4848 # Creates a target for publicly exporting tablegen dependencies.