summaryrefslogtreecommitdiffstats
path: root/extras/libmemif/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'extras/libmemif/CMakeLists.txt')
-rw-r--r--extras/libmemif/CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/extras/libmemif/CMakeLists.txt b/extras/libmemif/CMakeLists.txt
index 8f057e98f3a..1526abdce3a 100644
--- a/extras/libmemif/CMakeLists.txt
+++ b/extras/libmemif/CMakeLists.txt
@@ -61,6 +61,17 @@ set(CMAKE_INSTALL_MESSAGE NEVER)
find_package(Threads REQUIRED)
include_directories(${CMAKE_THREADS_INCLUDE_DIRS})
+if(DEFINED LIBMEMIF_CACHELINE_SIZE)
+ # Cache line size assigned via cmake args
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
+ set(LIBMEMIF_CACHELINE_SIZE 128)
+else()
+ set(LIBMEMIF_CACHELINE_SIZE 64)
+endif()
+
+message(STATUS "System Architecture: ${CMAKE_SYSTEM_PROCESSOR}")
+message(STATUS "Libmemif Cacheline Size: ${LIBMEMIF_CACHELINE_SIZE}")
+
check_function_exists(memfd_create HAVE_MEMFD_CREATE)
if(${HAVE_MEMFD_CREATE})
add_definitions(-DHAVE_MEMFD_CREATE)