Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the correct triple for arm64 #126

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
14 changes: 8 additions & 6 deletions cmake/GetTriplet.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
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")
endif()
if(host_arch STREQUAL "amd64")
elseif(host_arch STREQUAL "amd64")
set(host_arch "x86_64")
elseif(host_arch STREQUAL "arm64")
set(host_arch "aarch64")
endif()

if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
Expand All @@ -28,12 +29,13 @@ 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")
endif()
if(host_arch STREQUAL "amd64")
elseif(host_arch STREQUAL "amd64")
set(host_arch "x86_64")
elseif(host_arch STREQUAL "arm64")
set(host_arch "aarch64")
endif()

if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
Expand Down