<div dir="ltr">Hi,<div><br></div><div>Have you tried using the 'CUDA_ADD_CUBLAS_TO_TARGET' command on the target that has FindCUDA separable compilation enabled?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 1, 2017 at 11:16 AM, Jamil Appa <span dir="ltr"><<a href="mailto:jamil.appa@zenotech.com" target="_blank">jamil.appa@zenotech.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi <div><br></div><div>   When using FindCUDA with separable compilation combined with device code that uses cublas_device I get missing symbols when linking the intermediate file at line <a class="m_-2983343933963725884inbox-inbox-diff-line-num" href="https://gitlab.kitware.com/cmake/cmake/blob/release/Modules/FindCUDA.cmake#L1758" id="m_-2983343933963725884inbox-inbox-L1758" style="box-sizing:border-box;background-color:rgb(250,250,250);color:rgba(0,0,0,0.3);text-decoration-line:none;border-color:rgb(240,240,240);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;display:inline!important;min-height:19px;white-space:nowrap;text-align:right;font-size:12px" target="_blank">1758</a> FindCUDA.cmake</div><div><br></div><div>   If I  change line 1758 to include the cublas_device library the symbols are resolved correctly.</div><div><br></div><div>   COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} -dlink ${object_files} -o ${output_file} -lcublas_device</div><div><br></div><div>   Is there a way to pass through a library to the CUDA_LINK_SEPARABLE_<wbr>COMPILATION_OBJECTS function that I am missing?</div><div><br></div><div>   Thanks</div><div><br></div><div> Jamil</div><div><div class="m_-2983343933963725884GmSign"><div dir="ltr"><br><table border="0" width="500" cellspacing="0" cellpadding="0" style="border-collapse:collapse;font-family:helvetica,arial;color:rgb(107,97,96);width:500px;margin:0px;padding:0px"><tbody><tr><td colspan="3" width="500" style="border-collapse:collapse;font-family:helvetica,arial;padding-bottom:10px;padding-left:10px;width:500px;font-size:13px"><strong>Jamil Appa</strong> | Co-Founder and Director | Zenotech</td></tr><tr style="background-color:rgb(243,243,243)"><td colspan="3" width="500" style="border-collapse:collapse;font-family:helvetica,arial"><img src="https://sites.google.com/a/zenotech.com/external/papercut-top.jpg" width="500px" height="14px" alt="Papercut" title="Papercut" border="0"></td></tr><tr style="background-color:rgb(243,243,243)"><td colspan="1" width="30" height="30" style="border-collapse:collapse;font-family:helvetica,arial;padding-right:10px;padding-left:10px"><img src="https://sites.google.com/a/zenotech.com/external/tel.jpg" width="20px" height="20px" alt="Tel:" title="Tel:" border="0" style="vertical-align:middle"></td><td width="280" style="border-collapse:collapse;font-family:helvetica,arial;font-size:12px"><a href="tel:+44%207747%20606788" value="+447747606788" target="_blank">+44 (0)7747 606 788</a></td><td rowspan="3" style="border-collapse:collapse;font-family:helvetica,arial"><a href="http://www.zenotech.com/" target="_blank"><img src="https://sites.google.com/a/zenotech.com/external/logo.jpg" alt="Zenotech LTD - Simulation Unlimited" title="Zenotech LTD - Simulation Unlimited" border="0"></a></td></tr><tr style="background-color:rgb(243,243,243)"><td width="30" height="30" style="border-collapse:collapse;font-family:helvetica,arial;padding-right:10px;padding-left:10px"><img src="https://sites.google.com/a/zenotech.com/external/email.jpg" width="20px" height="20px" alt="Email:" title="Email:" border="0" style="vertical-align:middle"></td><td width="280" style="border-collapse:collapse;font-family:helvetica,arial;font-size:12px"><a href="mailto:jamil.appa@zenotech.com" style="color:rgb(107,97,96);text-decoration:none" target="_blank">jamil.appa@zenotech.com</a></td></tr><tr style="background-color:rgb(243,243,243)"><td width="30" height="30" style="border-collapse:collapse;font-family:helvetica,arial;padding-right:10px;padding-left:10px"><img src="https://sites.google.com/a/zenotech.com/external/web.jpg" width="20px" height="20px" alt="Web:" title="Web:" border="0" style="vertical-align:middle"></td><td width="280" style="border-collapse:collapse;font-family:helvetica,arial;font-size:12px"><a href="http://www.zenotech.com/" style="color:rgb(107,97,96);text-decoration:none" target="_blank">www.zenotech.com</a></td></tr><tr style="background-color:rgb(243,243,243)"><td colspan="3" width="500" style="border-collapse:collapse;font-family:helvetica,arial"><img src="https://sites.google.com/a/zenotech.com/external/papercut-bottom.jpg" width="500px" height="14px" alt="Papercut" title="Papercut" border="0" style="vertical-align:bottom"></td></tr></tbody></table><table border="0" width="500" cellspacing="0" cellpadding="0" style="border-collapse:collapse;font-family:helvetica,arial;color:rgb(107,97,96);width:500px;margin:0px;padding:0px"><tbody><tr><td rowspan="3" width="85" height="20" style="border-collapse:collapse;font-family:helvetica,arial;padding-right:10px;padding-left:10px"><a href="http://uk.linkedin.com/pub/jamil-appa/1/165/120" target="_blank"><img src="https://sites.google.com/a/zenotech.com/external/linkedin.jpg" width="20px" height="20px" alt="linkedin:" title="linkedin:" border="0" style="padding-right:6px"></a><a href="https://twitter.com/zenotech" target="_blank"><img src="https://sites.google.com/a/zenotech.com/external/twitter.jpg" width="20px" height="20px" alt="Twitter:" title="Twitter:" border="0" style="padding-right:6px"></a><a href="https://www.google.co.uk/maps/place/Bristol+%26+Bath+Science+Park/@51.500921,-2.478567,17z/data=!3m1!4b1!4m2!3m1!1s0x48719ab86a5a9f7d:0xd17394f3400abb0a" target="_blank"><img src="https://sites.google.com/a/zenotech.com/external/location.jpg" width="20px" height="20px" alt="Location:" title="Location:" border="0"></a></td><td colspan="2" width="400" height="20" style="border-collapse:collapse;font-family:helvetica,arial;font-size:10px;padding-top:10px"><p style="line-height:7px">Company Registration No : <span>07926926</span> | VAT No : <span>128198591</span></p><p style="line-height:7px">Registered Office : <span>1 Larkfield Grove, Chepstow, Monmouthshire, NP16 5UF, UK</span></p><p style="line-height:7px">Address : Bristol & Bath Science Park, Dirac Cres, Emersons Green, Bristol BS16 7FR</p><div><br></div></td></tr></tbody></table></div></div></div></div>
<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a><br></blockquote></div><br></div>