Skip to content

Commit bd688c8

Browse files
committed
fix: add warning for compiling cuda without vcvarsall
1 parent 8070847 commit bd688c8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Cuda.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,11 @@ macro(target_link_cuda target)
3838
# so that the static cuda runtime can find it at runtime.
3939
set_property(TARGET ${target} PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
4040
endif()
41+
42+
if(WIN32 AND "$ENV{VSCMD_VER}" STREQUAL "")
43+
message(
44+
WARNING
45+
"Compiling Cuda on Windows outside the Visual Studio Commant prompt or without running `vcvarsall.bat x64` probably fails"
46+
)
47+
endif()
4148
endmacro()

0 commit comments

Comments
 (0)