From b866f5ac46613df8930924fcfa221a4dbdf4e814 Mon Sep 17 00:00:00 2001 From: Georg Hagen Date: Wed, 1 Jan 2025 19:45:08 +0100 Subject: [PATCH] Fix bug with GenerateTriplet --- cmake/functions/GenerateTriplet.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/functions/GenerateTriplet.cmake b/cmake/functions/GenerateTriplet.cmake index 885aa8e..973fb46 100644 --- a/cmake/functions/GenerateTriplet.cmake +++ b/cmake/functions/GenerateTriplet.cmake @@ -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()