Upgrade CMake version for android builds

Summary:
The Android SDK also ships with CMake 3.10.2. This lets us delete the
special case for it in our CMake files.

More importantly, we need the newer version of CMake in order to use
the prebuilt libfbjni.so from maven.

Reviewed By: tmikov

Differential Revision: D28791953

fbshipit-source-id: 11828d660350a497d189c3a5d95afb1c40470b01
This commit is contained in:
Neil Dhar 2021-06-02 00:07:31 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 1986e4bf48
Коммит dfef1abd6d
6 изменённых файлов: 7 добавлений и 14 удалений

Просмотреть файл

@ -70,7 +70,7 @@ jobs:
- run:
name: Set up workspace and install dependencies
command: |
yes | sdkmanager "cmake;3.6.4111459" &
yes | sdkmanager "cmake;3.10.2.4988404" &
mkdir -p "$HERMES_WS_DIR" "$HERMES_WS_DIR/output"
ln -sf "$PWD" "$HERMES_WS_DIR/hermes"
sudo apt-get update
@ -79,7 +79,7 @@ jobs:
sudo cp /usr/bin/ninja /usr/bin/ninja.real
# See top comment
printf '%s\n' '#!/bin/sh' 'ninja.real -j4 "$@" || ninja.real -j1 "$@"' | sudo tee /usr/bin/ninja
ln -sf /usr/bin/ninja /opt/android/sdk/cmake/3.6.4111459/bin/ninja
ln -sf /usr/bin/ninja /opt/android/sdk/cmake/3.10.2.4988404/bin/ninja
- run:
name: Build Hermes Compiler
command: |

Просмотреть файл

@ -3,14 +3,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
if(NOT HERMES_IS_ANDROID)
# We need FindICU from 3.7
cmake_minimum_required(VERSION 3.7.0)
else()
# We'll be using ICU through Java, so we don't need FindICU.
# 3.6.0 is the minimum version shipped with the Android SDK.
cmake_minimum_required(VERSION 3.6.0)
endif()
cmake_minimum_required(VERSION 3.7.0)
# Set the VERSION variables based on the project command
if (POLICY CMP0048)

Просмотреть файл

@ -29,7 +29,7 @@ android {
externalNativeBuild {
cmake {
version "3.6.0"
version "3.10.2"
path "src/main/cpp/CMakeLists.txt"
buildStagingDirectory = "${rootProject.ext.hermes_ws}/staging/cppruntime"
buildStagingDirectory.mkdirs()

Просмотреть файл

@ -3,6 +3,6 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
cmake_minimum_required(VERSION 3.6.0)
cmake_minimum_required(VERSION 3.7.0)
add_library(stub SHARED stub.cpp)

Просмотреть файл

@ -35,7 +35,7 @@ android {
externalNativeBuild {
cmake {
version "3.6.0"
version "3.10.2"
path "../../CMakeLists.txt"
buildStagingDirectory = "${rootProject.ext.hermes_ws}/staging/hermes"
buildStagingDirectory.mkdirs()

Просмотреть файл

@ -77,7 +77,7 @@ android {
externalNativeBuild {
cmake {
version "3.6.0"
version "3.10.2"
path "../../CMakeLists.txt"
buildStagingDirectory = "${rootProject.ext.hermes_ws}/staging/intl"
buildStagingDirectory.mkdirs()