Skip to content

Commit 1a3972a

Browse files
committed
fixup: dictionary of list
1 parent b93ae4b commit 1a3972a

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

‎cmake/Yokai/Architecture.cmake‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,11 @@ function(yokai_detect_host_arch)
5353
endforeach()
5454

5555
if ("${arch_name}" STREQUAL "unknown")
56-
set(ARCH_em64t "amd64")
57-
set(ARCH_x86_64 "amd64")
58-
set(ARCH_armv6l "arm")
59-
set(ARCH_armv7l "arm")
60-
set(ARCH_aarch64 "arm64")
61-
set(ARCH_loongarch64 "loong64")
62-
set(ARCH_ppc64le "ppc64el")
56+
set(ARCHES_amd64 "em64t" "x86_64")
57+
set(ARCHES_arm "armv6l" "armv7l")
58+
set(ARCHES_arm64 "aarch64")
59+
set(ARCHES_loong64 "loongarch64")
60+
set(ARCHES_ppc64el "ppc64le")
6361

6462
foreach(name
6563
"amd64"
@@ -68,8 +66,8 @@ function(yokai_detect_host_arch)
6866
"loong64"
6967
"ppc64el"
7068
)
71-
if ("${ARCH_${processor_lower}}" STREQUAL "${name}")
72-
set(arch_name "${name}")
69+
if ("${processor_lower}" IN_LIST ARCHES_${name})
70+
set(arch_name "${processor_lower}")
7371
endif()
7472
endforeach()
7573
endif()

0 commit comments

Comments
 (0)