[CMake] check_library_exists, built-in, and -Werror

Roland Schulz roland at utk.edu
Wed Jun 17 14:39:46 EDT 2015


Hi,

When using CFLAGS=-Werror
$ check_library_exists(m sqrt "" HAVE_LIBM)
fails to give the correct result.

A very similar issue has been reported before for CHECK_FUNCTION_EXISTS
http://www.cmake.org/Bug/view.php?id=8246

There the recommendation was to use CHECK_SYMBOL_EXISTS instead.

My questions:
1) Is there an replacement for check_library_exists which gives the correct
results for built-ins even with -Werror?
2) Should check_library_exists correctly work in this case and should I
open a bug for it?

Roland

-- 
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150617/83e54287/attachment.html>


More information about the CMake mailing list