From 7cd0559d8c4780a1aa1ba302985e71f3ebaed31c Mon Sep 17 00:00:00 2001
From: Florent Pruvost <florent.pruvost@inria.fr>
Date: Wed, 6 Sep 2023 09:51:42 +0200
Subject: [PATCH] M: fix test source file to be compiled even with -Werror C
 flag

---
 modules/find/FindM.cmake | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/find/FindM.cmake b/modules/find/FindM.cmake
index cfbe690..5abbd48 100644
--- a/modules/find/FindM.cmake
+++ b/modules/find/FindM.cmake
@@ -38,8 +38,7 @@ include(FindPackageHandleStandardArgs)
 
 # check that we can call math directly with the compiler
 include(CheckCSourceCompiles)
-set(LIBM_TEST_SOURCE "#include<math.h>\nfloat f; int main(){sqrt(f);return
-0;}")
+set(LIBM_TEST_SOURCE "#include<math.h>\nfloat f; int main(){float s=sqrt(f);return 0;}")
 check_c_source_compiles("${LIBM_TEST_SOURCE}" HAVE_MATH)
 
 # if works with the compiler we do not need anything else, variables are empty
@@ -81,4 +80,4 @@ else()
     endif()
   endif()
 
-endif()
\ No newline at end of file
+endif()
-- 
GitLab