Thanks! Tried option (2), and it helps. Best, - D.
2013/8/28 James Bigler <jbig...@nvidia.com>: > There are a couple of options you can do. > > 1. Create your own version of CUDA_ADD_LIBRARY or CUDA_ADD_EXECUTABLE. > 2. (my vote) Override the value of CUDA_LIBRARIES just before your call to > CUDA_ADD_LIBRARY/EXECUTABLE. > > set(CUDA_LIBRARIES myoverride_cudart ${CUDA_LIBRARIES}) > cuda_add_library(...) > # Restore CUDA_LIBRARIES as you see fit > > James > > -----Original Message----- > From: Dmitry Mikushin [mailto:dmi...@kernelgen.org] > Sent: Tuesday, August 27, 2013 8:05 PM > To: James Bigler; Abe Stephens > Cc: cmake@cmake.org > Subject: How to place user-specified linked libraries *before* CUDA libraries? > > 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. > ----------------------------------------------------------------------------------- > This email message is for the sole use of the intended recipient(s) and may > contain > confidential information. Any unauthorized review, use, disclosure or > distribution > is prohibited. If you are not the intended recipient, please contact the > sender by > reply email and destroy all copies of the original message. > ----------------------------------------------------------------------------------- -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake