Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/Yokai/Detection/detect
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
20 changes: 9 additions & 11 deletions cmake/Yokai/System.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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)
Expand Down
Loading