[llvm] r200149 - [CMake] Functionalize tblgen().
NAKAMURA Takumi
geek4civic at gmail.com
Sun Jan 26 04:41:33 PST 2014
Author: chapuni
Date: Sun Jan 26 06:41:33 2014
New Revision: 200149
URL: http://llvm.org/viewvc/llvm-project?rev=200149&view=rev
Log:
[CMake] Functionalize tblgen().
Modified:
llvm/trunk/cmake/modules/TableGen.cmake
Modified: llvm/trunk/cmake/modules/TableGen.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=200149&r1=200148&r2=200149&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/TableGen.cmake (original)
+++ llvm/trunk/cmake/modules/TableGen.cmake Sun Jan 26 06:41:33 2014
@@ -2,7 +2,7 @@
# Extra parameters for `tblgen' may come after `ofn' parameter.
# Adds the name of the generated file to TABLEGEN_OUTPUT.
-macro(tablegen project ofn)
+function(tablegen project ofn)
file(GLOB local_tds "*.td")
file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td")
@@ -40,10 +40,10 @@ macro(tablegen project ofn)
set_property(DIRECTORY APPEND
PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${ofn}.tmp ${ofn})
- set(TABLEGEN_OUTPUT ${TABLEGEN_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${ofn})
+ set(TABLEGEN_OUTPUT ${TABLEGEN_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${ofn} PARENT_SCOPE)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${ofn}
PROPERTIES GENERATED 1)
-endmacro(tablegen)
+endfunction(tablegen)
macro(add_public_tablegen_target target)
# Creates a target for publicly exporting tablegen dependencies.
More information about the llvm-commits
mailing list