summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-01-03 20:01:32 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-01-03 20:01:32 +0000
commit0db031d532f4e148a5c83c376116d7255d04eac6 (patch)
treea812c520d60c1e3630ace99f3a73bc1891137afd /llvm/cmake
parent9ebe1724e345aac489a68473be3586cc598870a8 (diff)
downloadbcm5719-llvm-0db031d532f4e148a5c83c376116d7255d04eac6.tar.gz
bcm5719-llvm-0db031d532f4e148a5c83c376116d7255d04eac6.zip
TableGen.cmake: sometimes the .td file is not in the current directory
(clang/include/clang/Basic/StmtNodes.td, for instance, is tablegenned from clang/include/clang/AST/CMakeLists.txt) so it is not contained on the list of all .td files on the current source directory which is used as the DEPENDS of the custom command. We must add the .td file to the DEPENDS list of the custom command. Otherwise some .inc files are not regenerated when the corresponding .td file changes. llvm-svn: 122768
Diffstat (limited to 'llvm/cmake')
-rw-r--r--llvm/cmake/modules/TableGen.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake
index e61a3427cc2..c1a11b34261 100644
--- a/llvm/cmake/modules/TableGen.cmake
+++ b/llvm/cmake/modules/TableGen.cmake
@@ -18,7 +18,10 @@ macro(tablegen ofn)
-I ${LLVM_MAIN_SRC_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR}
${LLVM_TARGET_DEFINITIONS_ABSOLUTE}
-o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
- DEPENDS tblgen ${local_tds} ${global_tds}
+ # The file in LLVM_TARGET_DEFINITIONS may be not in the current
+ # directory and local_tds may not contain it, so we must
+ # explicitly list it here:
+ DEPENDS tblgen ${local_tds} ${global_tds} ${LLVM_TARGET_DEFINITIONS_ABSOLUTE}
COMMENT "Building ${ofn}..."
)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
OpenPOWER on IntegriCloud