From eef983b1df7c1d88dfe6b3c64bec49dcc6897e90 Mon Sep 17 00:00:00 2001 From: evo <149657734+evo-i@users.noreply.github.com> Date: Sun, 17 Dec 2023 11:19:20 +0300 Subject: [PATCH] Update CMakeLists.txt Replace with `execute_process` available on v3.0+ --- CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9e9dc92..413ea219 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,11 +179,8 @@ endif() # https://github.com/ffainelli/uClibc/blob/266bdc1/libc/misc/locale/locale.c#L1322 # So, if it looks like we're compiling for a system like that just disable # locale handling entirely. -if (CMAKE_VERSION GREATER_EQUAL "3.28") - execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpmachine ERROR_QUIET OUTPUT_VARIABLE CMAKE_GNU_C_MACHINE) -else () - exec_program(${CMAKE_C_COMPILER} ARGS -dumpmachine OUTPUT_VARIABLE CMAKE_GNU_C_MACHINE) -endif () +execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpmachine ERROR_QUIET OUTPUT_VARIABLE CMAKE_GNU_C_MACHINE) + if (CMAKE_GNU_C_MACHINE MATCHES "uclibc") message(STATUS "Detected uClibc compiler, disabling locale handling") set(HAVE_SETLOCALE 0) -- 2.39.5