From 47ec447dd0902661c3e21766b60788a43778d401 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 8 Apr 2024 02:11:14 -0700 Subject: [PATCH] CMakeLists: Fix strtof_l detection logic --- CMakeLists.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f2ff4686..aee8ac512 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -345,18 +345,14 @@ find_function(popcount32) find_function(futimens) find_function(futimes) +find_function(localtime_r) find_function(realpath) if(ANDROID AND ANDROID_NDK_MAJOR GREATER 13) - find_function(localtime_r) - set(HAVE_STRTOF_L ON) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") - find_function(localtime_r) + list(APPEND FUNCTION_DEFINES HAVE_STRTOF_L) +elseif(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux") # The strtof_l on Linux not actually exposed nor actually strtof_l - set(HAVE_STRTOF_L OFF) -else() - find_function(localtime_r) find_function(strtof_l) endif()