From f5beb883c2d478fa4e26e4c6fdcb91d27cc5a886 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Fri, 27 Oct 2017 10:43:15 -0400 Subject: [PATCH] Disable macOS architecture hack on CMake 3.0. Per the comment, it's no longer necessary. macOS i386 does not exist, but apparently iOS i386 does! We can probably just remove it altogether, but our cmake_minimum_required is nominally 2.8, so I just put the version check in. Bug: 210 Change-Id: I6e0617a3f292a218b2465eee85bd4814bd0e55c7 Reviewed-on: https://boringssl-review.googlesource.com/22304 Commit-Queue: Steven Valdez Reviewed-by: Steven Valdez CQ-Verified: CQ bot account: commit-bot@chromium.org --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 32f49a53..1f2f6ba0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -310,7 +310,7 @@ if (ANDROID AND ${ARCH} STREQUAL "arm") set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=${CMAKE_SYSTEM_PROCESSOR}") endif() -if (${ARCH} STREQUAL "x86" AND APPLE) +if (${ARCH} STREQUAL "x86" AND APPLE AND ${CMAKE_VERSION} VERSION_LESS "3.0") # With CMake 2.8.x, ${CMAKE_SYSTEM_PROCESSOR} evalutes to i386 on OS X, # but clang defaults to 64-bit builds on OS X unless otherwise told. # Set ARCH to x86_64 so clang and CMake agree. This is fixed in CMake 3.