Files
Prabhu Rajasekaran fdbd17d1fb [llvm] Add subcommand support for OptTable (#155026)
Implement support for `subcommands` in OptTable to attain feature parity
with `cl`.

Design overview:
https://discourse.llvm.org/t/subcommand-feature-support-in-llvm-opttable/88098

Issue: https://github.com/llvm/llvm-project/issues/108307
2025-10-06 12:11:00 -07:00

20 lines
378 B
CMake

# Set the .td file to be processed for this target.
set(LLVM_TARGET_DEFINITIONS Opts.td)
tablegen(LLVM Opts.inc -gen-opt-parser-defs)
add_public_tablegen_target(HelloSubTableGen)
set(LLVM_LINK_COMPONENTS
Support
Option
)
add_llvm_example(OptSubcommand
llvm-hello-sub.cpp
)
target_include_directories(OptSubcommand
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}
)