From e1174605fca1d121bccffac73a2144465cc2101b Mon Sep 17 00:00:00 2001
From: Florent Pruvost <florent.pruvost@inria.fr>
Date: Thu, 28 Sep 2023 08:15:27 +0200
Subject: [PATCH] M: module not compliant with -Werror, remove it temporarily.

---
 modules/find/FindM.cmake | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/find/FindM.cmake b/modules/find/FindM.cmake
index f723aab..7d2578d 100644
--- a/modules/find/FindM.cmake
+++ b/modules/find/FindM.cmake
@@ -35,6 +35,11 @@
 
 include(FindPackageHandleStandardArgs)
 
+# tests used in this script is not compliant with -Werror
+# remove it temporarily from C flags
+set( CMAKE_C_FLAGS_COPY "${CMAKE_C_FLAGS}" CACHE STRING "" )
+string(REPLACE "-Werror" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS_COPY})
+
 # check if we can call math directly without linking explicitly to libm
 include(CheckFunctionExists)
 check_function_exists(sqrt HAVE_MATH)
@@ -74,3 +79,5 @@ else()
   endif()
 
 endif()
+
+set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS_COPY}" CACHE STRING "" FORCE)
-- 
GitLab