<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial, sans-serif" size="2">
<div>Hello,</div>
<div>&nbsp;</div>
<div>Does CMake guarantee that the order of the libraries passed into target_link_libraries(...) is preserved on the actual link line?</div>
<div>&nbsp;</div>
<div>For example, If I have:</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp; target_link_libraries(sometarget lib1 lib2 lib3 ...)</div>
<div>&nbsp;</div>
<div>does CMake guarantee that the link line will have the ordering:</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp; g&#43;&#43;&nbsp; ... -llib1 -llib2 -llib3 ...</div>
<div>&nbsp;</div>
<div>?</div>
<div>&nbsp;</div>
<div>This is the behavior that I am seeing in the CMake version that I am using but there is no mention of this in the documentation for target_link_libraries(...) at:</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp; <a href="http://www.cmake.org/cmake/help/cmake2.6docs.html#command:target_link_libraries"><font color="#0000FF"><u>http://www.cmake.org/cmake/help/cmake2.6docs.html#command:target_link_libraries</u></font></a></div>
<div>&nbsp;</div>
<div>This is important because I have some arbitrary third partly libraries and some of them have some internal dependencies.&nbsp; I am happy to list these in the right order in one place to take are of the dependency ordering.</div>
<div>&nbsp;</div>
<div>I am nervous to rely on the ordering that I am seeing without some assurance that this ordering is guaranteed.</div>
<div>&nbsp;</div>
<div>Thanks,</div>
<div>&nbsp;</div>
<div>- Ross</div>
<div>&nbsp;</div>
<div><font face="Arial, sans-serif">---------------------------------------------------------</font></div>
<div><font face="Arial, sans-serif">Dr. Roscoe A. Bartlett</font></div>
<div><font face="Arial, sans-serif">Senior Member of the Technical Staff</font></div>
<div><font face="Arial, sans-serif">Trilinos Software Engineering Technologies and Integration Lead</font></div>
<div><font face="Arial, sans-serif">Sandia National Laboratories</font></div>
<div><font face="Arial, sans-serif">Phone: (505) 275-6147</font></div>
<div><font face="Arial, sans-serif">&nbsp;</font></div>
<div><font face="Arial, sans-serif">&nbsp;</font></div>
<div>&nbsp;</div>
</font>
</body>
</html>