[CMake] Cuda and CMake: Linking error : member .. in archive is not an object

Nicole Schubert n.schubert at fh-aachen.de
Mon Jan 14 09:58:17 EST 2013


Hi there,

I have problems with CMake and Cuda under Windows 7.

Here is my CMakeLists.txt:

...
###thecudafiles

SET(CUDA_SRCS  source/kernel.cu)


###  find  cuda

FIND_PACKAGE(CUDA 4.0)

SET(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE  OFF)

SET(CUDA_64_BIT_DEVICE_CODE  ON)

SET(CUDA_NVCC_FLAGS  "-arch;sm_13")

SET(CUDA_VERBOSE_BUILD  ON)

CUDA_COMPILE(CUDA_FILES  ${CUDA_SRCS}  OPTIONS  -ccbin  "C:/Program  Files  (x86)/Microsoft  Visual  Studio  9.0/VC/bin/cl.exe")


CUDA_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}

                                ${CMAKE_CURRENT_SOURCE_DIR}/source)

INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})

...

QT4_WRAP_UI( GUI_HDRS${GUI_SRCS})

QT4_WRAP_CPP( MOC_SRCS  ${MOC_HDRS})

ADD_EXECUTABLE( Project  ${H}  ${SRCS}  ${GUI_HDRS}  ${MOC_SRCS}  ${CUDA_FILES}  ${CUDA_SRCS})

###  link  libraries

TARGET_LINK_LIBRARIES(Project${QT_LIBRARIES}  ${CUDA_LIBRARIES}  )


The build files are generated, but :

Linking CXX executable Viewer.exe

CMakeFiles\Viewer.dir/objects.a: member 
CMakeFiles\Viewer.dir/objects.a(cuda_compile_generated_kernel.cu.obj) in 
archive is not an object



What is wrong with the cmake configuration?
I look forward to answers.


Best regards
N.Schubert



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130114/784e5dc0/attachment-0001.htm>


More information about the CMake mailing list