CMakeLists: Fix strtof_l detection logic

This commit is contained in:
Vicki Pfau 2024-04-08 02:11:14 -07:00
parent 04a95a5445
commit 47ec447dd0
1 changed files with 3 additions and 7 deletions

View File

@ -345,18 +345,14 @@ find_function(popcount32)
find_function(futimens) find_function(futimens)
find_function(futimes) find_function(futimes)
find_function(localtime_r)
find_function(realpath) find_function(realpath)
if(ANDROID AND ANDROID_NDK_MAJOR GREATER 13) if(ANDROID AND ANDROID_NDK_MAJOR GREATER 13)
find_function(localtime_r) list(APPEND FUNCTION_DEFINES HAVE_STRTOF_L)
set(HAVE_STRTOF_L ON) elseif(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
find_function(localtime_r)
# The strtof_l on Linux not actually exposed nor actually strtof_l # 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) find_function(strtof_l)
endif() endif()