diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake --- a/llvm/cmake/modules/TableGen.cmake +++ b/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}