This is an archive of the discontinued LLVM Phabricator instance.

Add cmake_parse_arguments() to `tablegen()` CMake function
ClosedPublic

Authored by mehdi_amini on Mar 13 2022, 10:02 PM.

Details

Summary

This support "DEPENDS" and "EXTRA_INCLUDES", allowing in particular
to inject include paths to a tablegen targets without forcing to go
through the global INCLUDE_DIRECTORIES property.

Diff Detail

Event Timeline

mehdi_amini created this revision.Mar 13 2022, 10:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 13 2022, 10:02 PM
Herald added a subscriber: mgorny. · View Herald Transcript
mehdi_amini requested review of this revision.Mar 13 2022, 10:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 13 2022, 10:02 PM
stellaraccident accepted this revision.Mar 13 2022, 10:33 PM

Thanks!

llvm/cmake/modules/TableGen.cmake
95

Can be for a followup, but I have found this transform to be fragile when empty items are present (the resultant error is quite bad since the "-I" eats the next argument, which then causes it to think the following argument is a source file). It was possible to have this happen before, but now that it is "user serviceable", we should be more defensive.

Can you add (before the TRANSFORM ... PREPEND):

list(REMOTE_ITEM tblgen_includes "")
This revision is now accepted and ready to land.Mar 13 2022, 10:33 PM
This revision was landed with ongoing or failed builds.Mar 13 2022, 11:56 PM
This revision was automatically updated to reflect the committed changes.