Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add patch for arm64 Ubuntu 22.04 in UnwindContext
[simgrid.git] / CMakeLists.txt
index 84fe7f3..366f0e3 100644 (file)
@@ -184,19 +184,28 @@ IF(CMAKE_SYSTEM_PROCESSOR MATCHES ".86|AMD64|amd64")
     message(STATUS "System processor: i686 (${CMAKE_SYSTEM_PROCESSOR}, 32 bits)")
     set(SIMGRID_PROCESSOR_i686 1)
     set(SIMGRID_PROCESSOR_x86_64 0)
+    set(SIMGRID_PROCESSOR_arm64 0)
   ELSE()
     message(STATUS "System processor: x86_64 (${CMAKE_SYSTEM_PROCESSOR}, 64 bits)")
     set(SIMGRID_PROCESSOR_i686 0)
     set(SIMGRID_PROCESSOR_x86_64 1)
+    set(SIMGRID_PROCESSOR_arm64 0)
   ENDIF()
   if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
     message(STATUS "Disable fast raw contexts on x32 ABI.")
   else()
     set(HAVE_RAW_CONTEXTS 1)
   endif()
+ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
+  message(STATUS "System processor: arm64 (${CMAKE_SYSTEM_PROCESSOR}, 64 bits)")
+  set(SIMGRID_PROCESSOR_i686 0)
+  set(SIMGRID_PROCESSOR_x86_64 0)
+  set(SIMGRID_PROCESSOR_arm64 1)
 ELSE()
+  message(STATUS "System processor (${CMAKE_SYSTEM_PROCESSOR}) not explicitly accounted for")
   set(SIMGRID_PROCESSOR_i686 0)
   set(SIMGRID_PROCESSOR_x86_64 0)
+  set(SIMGRID_PROCESSOR_arm64 0)
 ENDIF()
 
 include(CheckFunctionExists)