From a661fe7f446be00b203fef88b74957b1f3791ac0 Mon Sep 17 00:00:00 2001 From: Florent Pruvost <florent.pruvost@inria.fr> Date: Thu, 28 Sep 2023 08:23:55 +0200 Subject: [PATCH] M: fix string REPLACE usage. --- modules/find/FindM.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/find/FindM.cmake b/modules/find/FindM.cmake index 7d2578d..b49515a 100644 --- a/modules/find/FindM.cmake +++ b/modules/find/FindM.cmake @@ -37,8 +37,8 @@ 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}) +set(CMAKE_C_FLAGS_COPY "${CMAKE_C_FLAGS}" CACHE STRING "" FORCE) +string(REPLACE "-Werror" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS_COPY}") # check if we can call math directly without linking explicitly to libm include(CheckFunctionExists) @@ -80,4 +80,4 @@ else() endif() -set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS_COPY}" CACHE STRING "" FORCE) +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_COPY}" CACHE STRING "" FORCE) -- GitLab