add_subdirectory(ubse_cert)
add_subdirectory(ubse_cli_framework)
add_subdirectory(ubse_cli_consumer)
add_executable(ubsectl ubse_cli_main.cpp
ubse_cli_node_cmd_reg.cpp
ubse_cli_mem_cmd_reg.cpp
ubse_cli_cert_cmd_reg.cpp
ubse_cli_urma_cmd_reg.cpp
)
target_link_libraries(ubsectl PRIVATE
ubse_cli_framework
cert_api_static
ubse_ipc_client
ubse_serial
boundscheck
ubse_utils
trace_context
ubse_cli_consumer
)
target_compile_options(ubsectl PRIVATE
$<$<CONFIG:Debug>: ${DEBUG_FLAGS}>
$<$<CONFIG:Release>: ${RELEASE_FLAGS}>
$<$<CONFIG:RelWithDebInfo>: ${RELEASE_FLAGS}>
$<$<CONFIG:MinSizeRel>: ${RELEASE_FLAGS}>
)
get_target_property(UBSE_CLI_COMPILE_OPTIONS ubsectl COMPILE_OPTIONS)
message(DEBUG "ubsectl compile options: ${UBSE_CLI_COMPILE_OPTIONS}")
target_link_options(ubsectl PRIVATE -rdynamic -pie)