On Wed, Sep 28, 2011 at 2:47 AM, Michael Wild <them...@gmail.com> wrote:

>
> Only if your installation is broken ;-) If the symlink is broken, I
> consider this to be a user-error. Period. OTOH, CMake /could/ check
> whether the library is a symlink, and if it is, check that it is valid.
>

Oh, no question the installation is broken.  I'd just expect find_library to
do whatever minimal validation it can easily do and not return invalid cases
it can spot - checking for symlink and whether it's valid would catch one
general class of error, and perhaps a quick check to see if the file is a
binary or a text file would be another.   Not perfect, but such tests should
be relatively simple and would improve the utility of find_library.


> But how do you test whether a library is "linkable"?
>

Not sure - autoconf has some sort of test that works in at least some cases
in their AC_CHECK_LIB macro, but I'm not really clear on what it does.  Even
if such a test wouldn't catch all cases, mightn't it be useful to fail when
available tests do detect a problem?

Cheers,
CY
--

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

Reply via email to