Module: kamailio
Branch: master
Commit: 78ac89b1785c178d72410f54010c59d446b3b947
URL: 
https://github.com/kamailio/kamailio/commit/78ac89b1785c178d72410f54010c59d446b3b947

Author: drTr0jan <drtr0...@yandex.ru>
Committer: Xenofon Karamanos <xenakiskarama...@gmail.com>
Date: 2025-01-14T19:05:39+02:00

cmake: add amd64 arch fallback

---

Modified: cmake/compiler-specific.cmake
Modified: cmake/defs.cmake

---

Diff:  
https://github.com/kamailio/kamailio/commit/78ac89b1785c178d72410f54010c59d446b3b947.diff
Patch: 
https://github.com/kamailio/kamailio/commit/78ac89b1785c178d72410f54010c59d446b3b947.patch

---

diff --git a/cmake/compiler-specific.cmake b/cmake/compiler-specific.cmake
index 16b697fef35..e64ea577cbb 100644
--- a/cmake/compiler-specific.cmake
+++ b/cmake/compiler-specific.cmake
@@ -8,7 +8,7 @@ option(PROFILE "Enable profiling" OFF)
 add_library(common_compiler_flags INTERFACE)
 
 # Define the flags for the C compiler
-if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
 
   if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
     target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM)
diff --git a/cmake/defs.cmake b/cmake/defs.cmake
index 3659b26ab43..edb1e16d6e3 100644
--- a/cmake/defs.cmake
+++ b/cmake/defs.cmake
@@ -14,6 +14,8 @@ message(STATUS "OS version: ${OSREL}")
 
 if(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i486|i586|i686")
   set(TARGET_ARCH "i386")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
+  set(TARGET_ARCH "x86_64")
 else()
   set(TARGET_ARCH "${CMAKE_SYSTEM_PROCESSOR}")
 endif()
@@ -139,7 +141,7 @@ option(USE_FAST_LOCK "Use fast locking if available" ON)
 # Check the system processor type and set USE_FAST_LOCK accordingly
 if(USE_FAST_LOCK)
   if(CMAKE_SYSTEM_PROCESSOR MATCHES
-     "i386|i486|i586|i686|x86_64|sparc64|sparc|ppc|ppc64|alpha|mips2|mips64")
+     
"i386|i486|i586|i686|x86_64|amd64|sparc64|sparc|ppc|ppc64|alpha|mips2|mips64")
     set(USE_FAST_LOCK YES)
   elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
     set(USE_FAST_LOCK NO)

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to