junrushao commented on code in PR #351:
URL: https://github.com/apache/tvm-ffi/pull/351#discussion_r2636600219
##########
cmake/Utils/Library.cmake:
##########
@@ -137,3 +136,176 @@ function (tvm_ffi_add_target_from_obj target_name
obj_target_name)
tvm_ffi_add_apple_dsymutil(${target_name}_shared)
tvm_ffi_add_apple_dsymutil(${target_name}_testing)
endfunction ()
+
+# cmake-lint: disable=C0301,R0912,R0915
+# ~~~
+# tvm_ffi_configure_target(target_name [LINK_SHARED ON|OFF] [LINK_HEADER
ON|OFF] [DEBUG_SYMBOL ON|OFF] [MSVC_FLAGS ON|OFF])
+# Configure a target to integrate with TVM-FFI CMake utilities:
+# - Optionally link against tvm_ffi_header and/or tvm_ffi_shared
+# - Always apply tvm_ffi_add_prefix_map(target_name <current source dir>)
+# - Optionally enable Apple dSYM generation via
tvm_ffi_add_apple_dsymutil(target_name)
+# - Optionally apply MSVC-specific flags via
tvm_ffi_add_msvc_flags(target_name)
+#
+# Parameters:
+# target_name: Existing CMake target to modify (positional, required)
+#
+# Keyword parameters (all accept ON/OFF-like values; defaults shown):
+# LINK_SHARED: Whether to link tvm_ffi_shared into the target (default: ON)
+# LINK_HEADER: Whether to link tvm_ffi_header into the target (default: ON)
+# DEBUG_SYMBOL: Whether to enable debug symbol post-processing hooks.
+# On Apple this calls tvm_ffi_add_apple_dsymutil(target_name)
(default: ON)
+# On non-Apple platforms this is currently a no-op unless you
extend it. (default: ON)
+# MSVC_FLAGS: Whether to call tvm_ffi_add_msvc_flags(target_name) to apply
MSVC-specific flags (default: ON)
+#
+# Notes:
+# - Installation is intentionally split out. Use tvm_ffi_install(target_name
DESTINATION <dir>) to install artifacts.
+# - This function requires tvm_ffi_add_prefix_map() to be defined/included.
+# - If LINK_SHARED/LINK_HEADER are ON, the corresponding targets
(tvm_ffi_shared/tvm_ffi_header) must exist.
+# ~~~
+function (tvm_ffi_configure_target target)
Review Comment:
No I'm switching the name to `tvm_ffi_configure_target` now
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]