Skip to content

Commit 83f245a

Browse files
committed
Ensure the system arch is lowercase.
On Windows, `CMAKE_SYSTEM_PROCESSOR` can return AMD64, which fails the current check.
1 parent 5dc97b0 commit 83f245a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmake/GetTriplet.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function(get_host_triplet triplet)
2-
set(host_arch ${CMAKE_SYSTEM_PROCESSOR})
2+
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" host_arch)
33
if(host_arch STREQUAL "x86")
44
set(host_arch "i686")
55
elseif(host_arch STREQUAL "amd64")
@@ -29,7 +29,7 @@ function(get_host_triplet triplet)
2929
endfunction()
3030

3131
function(get_build_triplet triplet)
32-
set(host_arch ${CMAKE_HOST_SYSTEM_PROCESSOR})
32+
string(TOLOWER "${CMAKE_HOST_SYSTEM_PROCESSOR}" host_arch)
3333
if(host_arch STREQUAL "x86")
3434
set(host_arch "i686")
3535
elseif(host_arch STREQUAL "amd64")

0 commit comments

Comments
 (0)