Skip to content

Commit d473be3

Browse files
committed
yokai: rewrite some system detection to avoid warnings on macOS (looks like a rebasing mistake)
1 parent de4aef4 commit d473be3

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

cmake/Yokai/System.cmake

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@ function(yokai_detect_host_system)
4040
endif()
4141
endforeach()
4242

43-
if (system_name STREQUAL "Unknown")
44-
message(WARNING "Host system detection failed, may misdetect the target as the host.")
45-
46-
if (WIN32)
47-
set(system_name "Windows")
48-
elseif (APPLE)
49-
set(system_name "macOS")
50-
endif()
51-
endif()
52-
5343
if (system_name STREQUAL "Unknown")
5444
set(SYSTEM_Darwin "macOS")
5545
set(SYSTEM_MSYS "Windows")
@@ -59,8 +49,16 @@ function(yokai_detect_host_system)
5949
set(system_name "${SYSTEM_${name}}")
6050
endif()
6151
endforeach()
52+
endif()
6253

63-
detect_cmake_host_system("system_name")
54+
if (system_name STREQUAL "Unknown")
55+
message(WARNING "Host system detection failed, may misdetect the target as the host.")
56+
57+
if (WIN32)
58+
set(system_name "Windows")
59+
elseif (APPLE)
60+
set(system_name "macOS")
61+
endif()
6462
endif()
6563

6664
set(YOKAI_HOST_SYSTEM_NAME "${system_name}" PARENT_SCOPE)

0 commit comments

Comments
 (0)