Wow, that's pretty bad. I even replied to one of those threads. Sorry for the noise. The official bug post for this issue is here:<div><a href="http://public.kitware.com/Bug/view.php?id=10718">http://public.kitware.com/Bug/view.php?id=10718</a></div>
<div><br></div><div>I agree with Alan Irwin that it will continue to haunt users well into the future.</div><div><div><div><br><div class="gmail_quote">On Wed, Sep 8, 2010 at 2:38 AM, Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5"><br>
On 8. Sep, 2010, at 8:25 , Philip Lowman wrote:<br>
<br>
> Let's say I have many different potential names for a library and the<br>
> following filesystem<br>
><br>
> /usr/lib/libnspr4.so<br>
> ${CMAKE_CURRENT_SOURCE_DIR}/libnspr4a.so<br>
><br>
> find_library(TEST_LIBRARY<br>
> NAMES nspr4 nspr4a<br>
> HINTS ${CMAKE_CURRENT_SOURCE_DIR}<br>
> )<br>
><br>
> I'm somewhat surprised that the following code finds /usr/lib/libnspr4.so<br>
> instead of the alternate name for it (libnspr4a.so). This tells me that the<br>
> loop is backwards. Shouldn't the find_library() command be iterating the<br>
> list of library names across each directory. For example, the above should<br>
> search:<br>
><br>
> First ${CMAKE_CURRENT_SOURCE_DIR}...<br>
> ${CMAKE_CURRENT_SOURCE_DIR}/libnspr4.so<br>
> ${CMAKE_CURRENT_SOURCE_DIR}/libnspr4a.so<br>
> Then the system directories...<br>
> (system paths)/lib/libnspr4.so<br>
> (system paths)/lib/libnspr4a.so<br>
> Etc.<br>
><br>
> The system is actually searching<br>
> ${CMAKE_CURRENT_SOURCE_DIR}/libnspr4.so<br>
> /usr/lib/libnspr4.so<br>
> ${CMAKE_CURRENT_SOURCE_DIR}/libnspr4a.so<br>
> /usr/lib/libnspr4a.so<br>
><br>
> This is with CMake 2.8.2<br>
><br>
> --<br>
> Philip Lowman<br>
<br>
</div></div>Oh, no! This topic haunts the list ;-) See<br>
<br>
<a href="http://www.mail-archive.com/cmake@cmake.org/msg30602.html" target="_blank">http://www.mail-archive.com/cmake@cmake.org/msg30602.html</a><br>
<a href="http://www.mail-archive.com/cmake@cmake.org/msg28946.html" target="_blank">http://www.mail-archive.com/cmake@cmake.org/msg28946.html</a><br>
<a href="http://www.mail-archive.com/cmake@cmake.org/msg27838.html" target="_blank">http://www.mail-archive.com/cmake@cmake.org/msg27838.html</a><br>
<a href="http://www.mail-archive.com/cmake@cmake.org/msg24565.html" target="_blank">http://www.mail-archive.com/cmake@cmake.org/msg24565.html</a><br>
<br>
Michael<br>
<font color="#888888"><br>
--<br>
There is always a well-known solution to every human problem -- neat, plausible, and wrong.<br>
H. L. Mencken<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Philip Lowman<br>
</div></div></div>