tqchen commented on code in PR #114:
URL: https://github.com/apache/tvm-ffi/pull/114#discussion_r2428875120
##########
CMakeLists.txt:
##########
@@ -132,6 +131,30 @@ target_link_libraries(tvm_ffi_objs PUBLIC tvm_ffi_header)
target_link_libraries(tvm_ffi_shared PUBLIC tvm_ffi_header)
target_link_libraries(tvm_ffi_static PUBLIC tvm_ffi_header)
+# ######### Target: `tvm_ffi_testing` ##########
+# Build testing utilities as a separate shared library that can be loaded on
demand
+target_sources(tvm_ffi_testing PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/src/ffi/extra/testing.cc")
+target_compile_features(tvm_ffi_testing PRIVATE cxx_std_17)
+set_target_properties(
+ tvm_ffi_testing
+ PROPERTIES CXX_EXTENSIONS OFF
+ CXX_STANDARD_REQUIRED ON
+ PREFIX "lib"
+ LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
+)
+target_link_libraries(tvm_ffi_testing PRIVATE tvm_ffi_shared)
+target_link_libraries(tvm_ffi_testing PUBLIC tvm_ffi_header)
+tvm_ffi_add_msvc_flags(tvm_ffi_testing)
+tvm_ffi_add_apple_dsymutil(tvm_ffi_testing)
+if (TARGET libbacktrace)
+ target_link_libraries(tvm_ffi_testing PRIVATE libbacktrace)
Review Comment:
testing do not need to lib libbacktrace
##########
CMakeLists.txt:
##########
@@ -132,6 +131,30 @@ target_link_libraries(tvm_ffi_objs PUBLIC tvm_ffi_header)
target_link_libraries(tvm_ffi_shared PUBLIC tvm_ffi_header)
target_link_libraries(tvm_ffi_static PUBLIC tvm_ffi_header)
+# ######### Target: `tvm_ffi_testing` ##########
+# Build testing utilities as a separate shared library that can be loaded on
demand
+target_sources(tvm_ffi_testing PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/src/ffi/extra/testing.cc")
+target_compile_features(tvm_ffi_testing PRIVATE cxx_std_17)
+set_target_properties(
+ tvm_ffi_testing
+ PROPERTIES CXX_EXTENSIONS OFF
+ CXX_STANDARD_REQUIRED ON
+ PREFIX "lib"
+ LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
+)
+target_link_libraries(tvm_ffi_testing PRIVATE tvm_ffi_shared)
+target_link_libraries(tvm_ffi_testing PUBLIC tvm_ffi_header)
+tvm_ffi_add_msvc_flags(tvm_ffi_testing)
+tvm_ffi_add_apple_dsymutil(tvm_ffi_testing)
+if (TARGET libbacktrace)
+ target_link_libraries(tvm_ffi_testing PRIVATE libbacktrace)
+endif ()
+if (MSVC)
+ target_link_libraries(tvm_ffi_testing PRIVATE DbgHelp.lib)
+ # produce pdb file
Review Comment:
target do not need to link dbghelp
--
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]