From 3b0f8ab35f44ed2f5ca4cb9f1008b07982f79876 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sun, 21 Jun 2026 02:52:23 +0200 Subject: [PATCH 1/2] yokai: use awk when sed is not good enough on macOS (detect shell script) --- cmake/Yokai/Detection/detect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Yokai/Detection/detect b/cmake/Yokai/Detection/detect index f743697883..56966db068 100755 --- a/cmake/Yokai/Detection/detect +++ b/cmake/Yokai/Detection/detect @@ -56,7 +56,7 @@ do | sed -e 's/YOKAI_COMPILER/YOKAI_C_COMPILER/' \ | sed -e 's/YOKAI_SYSTEM/YOKAI_TARGET_SYSTEM/' \ | sed -e 's/YOKAI_ARCH/YOKAI_TARGET_ARCH/' \ - | sed -E 's/^([^=]+)=/\U\1=/' \ + | awk -F= '{print toupper($1) "=" $2}' \ || "${@}" "${file_path}" -o "${temp_file}" rm "${temp_file}" From 78d2d6220a14ce4a7eebcd0cf66f487fbf6099e0 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sun, 21 Jun 2026 03:01:33 +0200 Subject: [PATCH 2/2] yokai: rewrite some system detection to avoid warnings on macOS (looks like a rebasing mistake) --- cmake/Yokai/System.cmake | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/cmake/Yokai/System.cmake b/cmake/Yokai/System.cmake index bb873d4cc7..a8e9f329d1 100644 --- a/cmake/Yokai/System.cmake +++ b/cmake/Yokai/System.cmake @@ -40,16 +40,6 @@ function(yokai_detect_host_system) endif() endforeach() - if (system_name STREQUAL "Unknown") - message(WARNING "Host system detection failed, may misdetect the target as the host.") - - if (WIN32) - set(system_name "Windows") - elseif (APPLE) - set(system_name "macOS") - endif() - endif() - if (system_name STREQUAL "Unknown") set(SYSTEM_Darwin "macOS") set(SYSTEM_MSYS "Windows") @@ -59,8 +49,16 @@ function(yokai_detect_host_system) set(system_name "${SYSTEM_${name}}") endif() endforeach() + endif() - detect_cmake_host_system("system_name") + if (system_name STREQUAL "Unknown") + message(WARNING "Host system detection failed, may misdetect the target as the host.") + + if (WIN32) + set(system_name "Windows") + elseif (APPLE) + set(system_name "macOS") + endif() endif() set(YOKAI_HOST_SYSTEM_NAME "${system_name}" PARENT_SCOPE)