Skip to content

Commit 7ffc952

Browse files
authored
Fix win arg patch for BUILD_SPLIT_CUDA=ON (#3419)
1 parent 22c548b commit 7ffc952

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,15 @@ if(MSVC)
4444
string(APPEND CMAKE_CUDA_FLAGS " -Xcudafe --diag_suppress=${diag}")
4545
endforeach()
4646
CUDA_CONVERT_FLAGS(torch_cpu)
47-
CUDA_CONVERT_FLAGS(torch_cuda)
47+
if(TARGET torch_cuda)
48+
CUDA_CONVERT_FLAGS(torch_cuda)
49+
endif()
50+
if(TARGET torch_cuda_cu)
51+
CUDA_CONVERT_FLAGS(torch_cuda_cu)
52+
endif()
53+
if(TARGET torch_cuda_cpp)
54+
CUDA_CONVERT_FLAGS(torch_cuda_cpp)
55+
endif()
4856
endif()
4957
endif()
5058

0 commit comments

Comments
 (0)