Fix bug with GenerateTriplet

This commit is contained in:
Georg Hagen
2025-01-01 19:45:08 +01:00
parent 757b3b8d3c
commit b866f5ac46

View File

@@ -1,13 +1,13 @@
function(GenerateTriplet OUTPUT_VARIABLE)
# Determine system architecture
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ARCH "x64")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(ARCH "x86")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|aarch)64$")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|aarch)64$")
set(ARCH "arm64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|aarch).*")
set(ARCH "arm")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ARCH "x64")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(ARCH "x86")
else()
message(FATAL_ERROR "Unsupported architecture")
return()