[PATCH] D100902: [CMake][llvm] avoid includes with generator-expressions in add_custom_command
Jim Radford via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 20 15:39:01 PDT 2021
radford created this revision.
radford added a reviewer: arphaman.
Herald added a subscriber: mgorny.
radford requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Table generation's add_custom_command will break when any of the
INCLUDE_DIRECTORIES uses generator-expressions.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D100902
Files:
llvm/cmake/modules/TableGen.cmake
Index: llvm/cmake/modules/TableGen.cmake
===================================================================
--- llvm/cmake/modules/TableGen.cmake
+++ llvm/cmake/modules/TableGen.cmake
@@ -89,6 +89,8 @@
# ("${${project}_TABLEGEN_TARGET}" STREQUAL "${${project}_TABLEGEN_EXE}")
# but lets us having smaller and cleaner code here.
get_directory_property(tblgen_includes INCLUDE_DIRECTORIES)
+ # No support for generator-expressions in add_custom_command, so strip them
+ list(TRANSFORM tblgen_includes GENEX_STRIP)
list(TRANSFORM tblgen_includes PREPEND -I)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100902.339019.patch
Type: text/x-patch
Size: 636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210420/95d6d7be/attachment.bin>
More information about the llvm-commits
mailing list