I determined that this failed starting in 2.8.7 (2.8.6 has the cudart library on the link line, and 2.8.7 didn't). I didn't see anything particular about changes to the IMPORT libraries to suggest why this might have happened. I'll try and rig up a reproducer.
I did notice that there wasn't a test for IMPORTED_LINK_DEPENDENT_LIBRARIES aside from trying to create a circular dependency between a single library. On Wed, Mar 13, 2013 at 4:35 PM, James Bigler <[email protected]> wrote: > 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
