Skip to content

Commit

Permalink
Link cuda.lib using a preprocessor macro only for non-CMake (AlexeyAB…
Browse files Browse the repository at this point in the history
…#8173)

Debian CUDA packages don't ship a shim for the Windows SO cuda.lib, so compilation fails.
For CMake it's actually linked using targets, so avoid the preprocessor macro in that case.
  • Loading branch information
tambry authored Oct 24, 2021
1 parent aef928c commit 04b0b15
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/dark_cuda.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ int gpu_index = 0;
#include <cuda.h>
#include <stdio.h>

#ifndef USE_CMAKE_LIBS
#pragma comment(lib, "cuda.lib")


#ifdef CUDNN
#ifndef USE_CMAKE_LIBS
#pragma comment(lib, "cudnn.lib")
#endif // USE_CMAKE_LIBS
#endif // CUDNN
#endif // USE_CMAKE_LIBS

#if defined(CUDNN_HALF) && !defined(CUDNN)
#error "If you set CUDNN_HALF=1 then you must set CUDNN=1"
Expand Down

0 comments on commit 04b0b15

Please sign in to comment.