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
20 lines
378 B
CMake
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}
|
|
)
|