From 98bed62259788a2f73ef2146afe6cde161a157db Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Wed, 27 Aug 2025 21:33:55 +0300 Subject: [PATCH] cmake: fall back to -Wconversion if -Wfloat-conversion isn't available ... during checks for valid isinf/isinff/isnan/isnanf macros. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e46b0cdba4..2dc7f37b94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1085,8 +1085,10 @@ if(SDL_LIBC) cmake_push_check_state() if(MSVC) string(APPEND CMAKE_REQUIRED_FLAGS " -we4244 -WX") # 'conversion' conversion from 'type1' to 'type2', possible loss of data - else() + elseif(HAVE_GCC_WFLOAT_CONVERSION) string(APPEND CMAKE_REQUIRED_FLAGS " -Wfloat-conversion -Werror") + else() + string(APPEND CMAKE_REQUIRED_FLAGS " -Wconversion -Werror") endif() foreach(math_fn isinf isnan) string(TOUPPER "${math_fn}" MATH_FN)