Skip to content

Commit 3368248

Browse files
committed
voxtral cmake
1 parent 0af3f62 commit 3368248

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

examples/models/voxtral/CMakeLists.txt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,6 @@ if(EXECUTORCH_BUILD_CUDA)
9090
list(APPEND link_libraries aoti_cuda)
9191
# Handle both static library and shared library (.dll on Windows MSVC)
9292
executorch_target_link_options_shared_lib(aoti_cuda)
93-
# On MSVC, ensure the DLL is copied to the output directory
94-
if(MSVC)
95-
add_custom_command(TARGET voxtral_runner POST_BUILD
96-
COMMAND ${CMAKE_COMMAND} -E copy_if_different
97-
$<TARGET_FILE:aoti_cuda>
98-
$<TARGET_FILE_DIR:voxtral_runner>
99-
COMMENT "Copying aoti_cuda.dll to output directory"
100-
)
101-
endif()
10293
endif()
10394

10495
if(EXECUTORCH_BUILD_METAL)
@@ -110,6 +101,16 @@ endif()
110101
list(APPEND link_libraries tokenizers::tokenizers)
111102

112103
add_executable(voxtral_runner ${_srcs})
104+
105+
# On MSVC, ensure the aoti_cuda DLL is copied to the output directory
106+
if(EXECUTORCH_BUILD_CUDA AND MSVC)
107+
add_custom_command(TARGET voxtral_runner POST_BUILD
108+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
109+
$<TARGET_FILE:aoti_cuda>
110+
$<TARGET_FILE_DIR:voxtral_runner>
111+
COMMENT "Copying aoti_cuda.dll to output directory"
112+
)
113+
endif()
113114
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
114115
target_link_options_gc_sections(voxtral_runner)
115116
if(NOT APPLE)

0 commit comments

Comments
 (0)