Using check_library doesn't work with build-ins like sqrt
with Werror. sqrt was anyhow only a placeholder for a standard
libm function. We really only need to know whether the library
exists.
Fixes #1750
Change-Id: I6a550cf8c8b8ea985b28130a4339935fb8c9741a
check_cxx_symbol_exists(sqrtf math.h HAVE_SQRTF)
include(CheckLibraryExists)
-check_library_exists(m sqrt "" HAVE_LIBM)
+find_library(HAVE_LIBM m)
check_library_exists(rt clock_gettime "" HAVE_CLOCK_GETTIME)
check_library_exists(m feenableexcept "" HAVE_FEENABLEEXCEPT)