junrushao commented on code in PR #114:
URL: https://github.com/apache/tvm-ffi/pull/114#discussion_r2427956747


##########
CMakeLists.txt:
##########
@@ -132,6 +131,29 @@ 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
+add_library(tvm_ffi_testing SHARED 
"${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)

Review Comment:
   good catch!



-- 
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]

Reply via email to