开发者

CMake + Link error + Whitespace in path

I'm trying to compile my CUDA project with CMake 2.8.2. My SDK is located in "/Developed/GPU Computing/" (OSX). The problem is the whitespace in the pa开发者_如何学JAVAth, thus CMake doesn't find the libs.

I tried: link_libraries("-L${CUDA_SDK_ROOT_DIR}/lib -lcutil")

Result: i686-apple-darwin10-g++-4.2.1: Computing/C/lib: No such file or directory

Does anyone know how to solve this problem? Thanks in advance.


You should use the target_link_libraries command

target_link_libraries(NameOfProject ${CUDA_SDK_LIBRARIES})

Make sure that CUDA_SDK_LIBRARIES points to the full path of the cuda libraries.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜