win: symbol exports and minor fixes (#3024)

Co-authored-by: Cheng <[email protected]>
This commit is contained in:
Daniel Hiltgen
2026-01-23 10:16:22 +09:00
committed by GitHub
co-authored by Cheng
parent c46c3833ee
commit 687508dd98
43 changed files with 701 additions and 583 deletions
+8
View File
@@ -3,6 +3,14 @@ function(build_benchmark SRCFILE)
set(target "${src_name}")
add_executable(${target} ${SRCFILE})
target_link_libraries(${target} PRIVATE mlx)
# On Windows, copy the mlx DLL to the executable directory for runtime loading
if(WIN32 AND BUILD_SHARED_LIBS)
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:mlx>
$<TARGET_FILE_DIR:${target}>)
endif()
endfunction(build_benchmark)
build_benchmark(single_ops.cpp)