summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-11-28 17:04:04 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-11-28 17:04:04 +0000
commitad363187c4707f7aee427347d4179eaefef832fe (patch)
tree2b2f5e91439f4900bc6a56fa07fdf9dfa0d882d6 /cmake
parent4ca0ef70cd5e9ac28907f0cf45aebd3dcb4c8b44 (diff)
downloadllvm-ad363187c4707f7aee427347d4179eaefef832fe.tar.gz
llvm-ad363187c4707f7aee427347d4179eaefef832fe.tar.bz2
llvm-ad363187c4707f7aee427347d4179eaefef832fe.tar.xz
[CMake] Let add_public_tablegen_target responsible to provide dependency to CommonTableGen.
add_public_tablegen_target adds *CommonTableGen to LLVM_COMMON_DEPENDS. LLVM_COMMON_DEPENDS affects add_llvm_library (and other add_target stuff) within its scope. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/TableGen.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake
index c17e67e478..71c74fa9a7 100644
--- a/cmake/modules/TableGen.cmake
+++ b/cmake/modules/TableGen.cmake
@@ -45,7 +45,7 @@ macro(tablegen project ofn)
PROPERTIES GENERATED 1)
endmacro(tablegen)
-function(add_public_tablegen_target target)
+macro(add_public_tablegen_target target)
# Creates a target for publicly exporting tablegen dependencies.
if( TABLEGEN_OUTPUT )
add_custom_target(${target}
@@ -54,8 +54,9 @@ function(add_public_tablegen_target target)
add_dependencies(${target} ${LLVM_COMMON_DEPENDS})
endif ()
set_target_properties(${target} PROPERTIES FOLDER "Tablegenning")
+ list(APPEND LLVM_COMMON_DEPENDS ${target})
endif( TABLEGEN_OUTPUT )
-endfunction()
+endmacro()
if(CMAKE_CROSSCOMPILING)
set(CX_NATIVE_TG_DIR "${CMAKE_BINARY_DIR}/native")