<div dir="ltr">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&#39;t).  I didn&#39;t see anything particular about changes to the IMPORT libraries to suggest why this might have happened.  I&#39;ll try and rig up a reproducer.<div>

<br></div><div>I did notice that there wasn&#39;t a test for <span style="font-size:13px;font-family:&#39;courier new&#39;,monospace">IMPORTED_LINK_DEPENDENT_</span><span style="font-size:13px;font-family:&#39;courier new&#39;,monospace">LIBRARIES</span> aside from trying to create a circular dependency between a single library. </div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 13, 2013 at 4:35 PM, James Bigler <span dir="ltr">&lt;<a href="mailto:jamesbigler@gmail.com" target="_blank">jamesbigler@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I used the following code in 2.8.4, but in 2.8.9 and 2.8.10 it doesn&#39;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?<div>


<br></div><div>I&#39;ll continue to try and narrow down the version of CMake where this stopped working.</div><div><br></div><div><div><font face="courier new, monospace">    # Create an imported static target</font></div>


<div><font face="courier new, monospace">    add_library(parallelprim STATIC IMPORTED)</font></div><div><font face="courier new, monospace">    # This library pertains to all configurations</font></div><div><font face="courier new, monospace">    set_property(TARGET parallelprim APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG)</font></div>


<div><font face="courier new, monospace">    # Set the location</font></div><div><font face="courier new, monospace">    set_target_properties(parallelprim PROPERTIES</font></div><div><font face="courier new, monospace">      IMPORTED_LOCATION_NOCONFIG &quot;${PARALLELPRIM_LIBRARY}&quot;)</font></div>


<div><font face="courier new, monospace">    # Set list of dependent libraries (parallelprim needs cudart)</font></div><div><span style="font-family:&#39;courier new&#39;,monospace">    set_target_properties(parallelprim PROPERTIES</span><br>


</div><div><font face="courier new, monospace">      IMPORTED_LINK_DEPENDENT_LIBRARIES ${CUDA_CUDART_LIBRARY})</font></div><div><br></div><div>I also tried this and it didn&#39;t work:</div><div><br></div><div>
<div><font face="courier new, monospace">    # Create an imported static target</font></div><div><font face="courier new, monospace">    add_library(parallelprim STATIC IMPORTED)</font></div><div><font face="courier new, monospace">    # Set the location<br>


</font></div><div><font face="courier new, monospace">    set_target_properties(parallelprim PROPERTIES</font></div><div><font face="courier new, monospace">      IMPORTED_LOCATION &quot;${PARALLELPRIM_LIBRARY}&quot;)</font></div>


<div><font face="courier new, monospace">    # Set list of dependent libraries (parallelprim needs cudart)</font></div><div><font face="courier new, monospace">    set_target_properties(parallelprim PROPERTIES<br></font></div>


<div><font face="courier new, monospace">      IMPORTED_LINK_DEPENDENT_LIBRARIES ${CUDA_CUDART_LIBRARY})</font></div><div><br></div><div>Thanks,</div><div>James</div></div></div></div>
</blockquote></div><br></div>