aboutsummaryrefslogtreecommitdiff
path: root/llvm/examples/OptSubcommand/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/examples/OptSubcommand/CMakeLists.txt')
-rw-r--r--llvm/examples/OptSubcommand/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/examples/OptSubcommand/CMakeLists.txt b/llvm/examples/OptSubcommand/CMakeLists.txt
new file mode 100644
index 0000000..debc948
--- /dev/null
+++ b/llvm/examples/OptSubcommand/CMakeLists.txt
@@ -0,0 +1,19 @@
+# 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}
+ )