From ad363187c4707f7aee427347d4179eaefef832fe Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 28 Nov 2013 17:04:04 +0000 Subject: [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 --- cmake/modules/TableGen.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmake') 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") -- cgit v1.2.3