[CMake] How to place user-specified linked libraries *before* CUDA libraries?

Dmitry Mikushin dmitry at kernelgen.org
Tue Aug 27 22:04:36 EDT 2013


Dear CUDA-for-CMake Maintainers,

Our package links a shared library, which defines some replacement
symbols for CUDA runtime (e.g. redefines cudaLaunch). In order to get
our replacements to take precedence over CUDA runtime, we need the
user-specified linked library to appear earlier in the link line than
${CUDA_LIBRARIES}. But from what I understand in FindCUDA.cmake
(v2.8), it seems that CUDA runtime libraries are currently hardcoded
to be always first in the link line. Is there a way to override this
behavior?

Thanks,
- D.


More information about the CMake mailing list