I used the following code in 2.8.4, but in 2.8.9 and 2.8.10 it doesn't add
the CUDA_CUDART_LIBRARY library to the eventual link line.  I see my target
linking against the parallelprim library but not the cudart library.  Did
something change in the interface between 2.8.4 and now?

I'll continue to try and narrow down the version of CMake where this
stopped working.

    # Create an imported static target
    add_library(parallelprim STATIC IMPORTED)
    # This library pertains to all configurations
    set_property(TARGET parallelprim APPEND PROPERTY
IMPORTED_CONFIGURATIONS NOCONFIG)
    # Set the location
    set_target_properties(parallelprim PROPERTIES
      IMPORTED_LOCATION_NOCONFIG "${PARALLELPRIM_LIBRARY}")
    # Set list of dependent libraries (parallelprim needs cudart)
    set_target_properties(parallelprim PROPERTIES
      IMPORTED_LINK_DEPENDENT_LIBRARIES ${CUDA_CUDART_LIBRARY})

I also tried this and it didn't work:

    # Create an imported static target
    add_library(parallelprim STATIC IMPORTED)
    # Set the location
    set_target_properties(parallelprim PROPERTIES
      IMPORTED_LOCATION "${PARALLELPRIM_LIBRARY}")
    # Set list of dependent libraries (parallelprim needs cudart)
    set_target_properties(parallelprim PROPERTIES
      IMPORTED_LINK_DEPENDENT_LIBRARIES ${CUDA_CUDART_LIBRARY})

Thanks,
James
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to