From 1d8adf18d20a4d65150af62159ab631d847e869a Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Thu, 31 Jul 2014 03:09:49 -0700 Subject: [PATCH] Fix CPU architecture detection on BSDs. CMake calls "uname" in order to detect the CPU architecture, so $(CMAKE_SYSTEM_PROCESSOR) varies from platform to platform. This changes adds support for "i386" and "amd64" values, which are used by BSDs for the x86 family of CPUs. Change-Id: I532ce787a9ac06220c92a6d8c78ad5a55d8c40bf Signed-off-by: Piotr Sikora Reviewed-on: https://boringssl-review.googlesource.com/1360 Reviewed-by: Adam Langley --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8645eafb..1e0ab079 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,8 @@ endif() if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") set(ARCH "x86_64") +elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "amd64") + set(ARCH "x86_64") elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64") # cmake reports AMD64 on Windows, but we might be building for 32-bit. if (CMAKE_CL_64) @@ -21,6 +23,8 @@ elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64") endif() elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86") set(ARCH "x86") +elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386") + set(ARCH "x86") elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm") set(ARCH "arm") else()