Set a minimum CMake version of 3.0.

CMake 3.0 was released June 10, 2014, just over five years ago. Set the minimum
version to 3.0. This cleans up some Mac workarounds. (CMP0025 was introduced
in 3.0, so setting the minimum version to 3.0 also enables it.)

CMP0025 is important because Clang and Apple Clang use different version
numbers. Prior to CMake 3.0, both read as Clang. Starting CMake 3.0, with
CMP0025 enabled, they read as Clang and AppleClang. Without this, we cannot
sanely version-check clang.

Unfortunately, CMP0025 applies at compiler detection, so if BoringSSL is
imported as a CMake subproject, we are dependent on the root project setting
CMP0025. But if we successfully set a minumum of 3.0, we can reasonably ask
consumers to do the same, which will do so.

Next up: In December, we can raise the version to CMake 3.1, which adds support
for specifying C and C++ language versions in CMake. (Alternatively, Abseil's
minimum version is actually 3.5, so maybe we can update more aggressively
here.)

Update-Note: CMake 2.8 is no longer supported. Update your CMake to the latest
    version if it has not been updated in five years.

Change-Id: I3378567ad7575fc9fac69e05c403d69ea10332e2
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36444
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/BUILDING.md b/BUILDING.md
index 4fc1615..e3a3570 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -10,8 +10,7 @@
 [Abseil guidelines](https://abseil.io/about/compatibility). If in doubt, use the
 most recent stable version of each tool.
 
-  * [CMake](https://cmake.org/download/) 2.8.12 or later is required. Note we
-    will begin requiring CMake 3.0 in 2019.
+  * [CMake](https://cmake.org/download/) 3.0 or later is required.
 
   * A recent version of Perl is required. On Windows,
     [Active State Perl](http://www.activestate.com/activeperl/) has been
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 67c1145..bcb82c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,4 @@
-cmake_minimum_required(VERSION 2.8.11)
-
-# Report AppleClang separately from Clang. Their version numbers are different.
-# https://cmake.org/cmake/help/v3.0/policy/CMP0025.html
-if(POLICY CMP0025)
-  cmake_policy(SET CMP0025 NEW)
-endif()
+cmake_minimum_required(VERSION 3.0)
 
 # Defer enabling C and CXX languages.
 project(BoringSSL NONE)
@@ -485,13 +479,6 @@
   set(CMAKE_ASM_FLAGS "-march=${CMAKE_SYSTEM_PROCESSOR} ${CMAKE_ASM_FLAGS}")
 endif()
 
-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.
-  set(ARCH "x86_64")
-endif()
-
 if(USE_CUSTOM_LIBCXX)
   if(NOT CLANG)
     message(FATAL_ERROR "USE_CUSTOM_LIBCXX only supported with Clang")