Skip to content

Commit

Permalink
Ensure the system arch is lowercase.
Browse files Browse the repository at this point in the history
On Windows, `CMAKE_SYSTEM_PROCESSOR` can return AMD64, which fails the
current check.
  • Loading branch information
FtZPetruska committed Jun 7, 2023
1 parent 8800a9e commit 74c9687
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/GetTriplet.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function(get_host_triplet triplet)
set(host_arch ${CMAKE_SYSTEM_PROCESSOR})
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" host_arch)
if(host_arch STREQUAL "x86")
set(host_arch "i686")
elseif(host_arch STREQUAL "amd64")
Expand Down Expand Up @@ -29,7 +29,7 @@ function(get_host_triplet triplet)
endfunction()

function(get_build_triplet triplet)
set(host_arch ${CMAKE_HOST_SYSTEM_PROCESSOR})
string(TOLOWER "${CMAKE_HOST_SYSTEM_PROCESSOR}" host_arch)
if(host_arch STREQUAL "x86")
set(host_arch "i686")
elseif(host_arch STREQUAL "amd64")
Expand Down

0 comments on commit 74c9687

Please sign in to comment.