Skip to content

Commit

Permalink
[windows] file(MAKE_DIRECTORY) before copying
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-xu committed Dec 3, 2023
1 parent d9c1cfa commit e54147d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions torchx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ endif()
# the DLLs need to be copied to avoid memory errors.
if(MSVC)
file(GLOB TORCH_DLLS "$ENV{LIBTORCH_DIR}/lib/*.dll")
if(NOT IS_DIRECTORY "${PRIV_DIR}/$ENV{LIBTORCH_BASE}")
file(MAKE_DIRECTORY "${PRIV_DIR}/$ENV{LIBTORCH_BASE}")
endif()
add_custom_command(TARGET torchx
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
Expand Down

0 comments on commit e54147d

Please sign in to comment.