From 6cfbcb77fa2ab94d42e61b6a95c31f8c281e90cd Mon Sep 17 00:00:00 2001 From: Roland Schulz Date: Sat, 27 Jun 2015 18:23:50 -0400 Subject: [PATCH] Don't use check_library for libm 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 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 14c8090b6b..e042aa054f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -356,7 +356,7 @@ check_cxx_symbol_exists(rsqrtf math.h HAVE_RSQRTF) 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) -- 2.22.0