Skip to content

Commit a2d6c5d

Browse files
neildharHuxpro
authored andcommitted
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
1 parent be87dd5 commit a2d6c5d

6 files changed

Lines changed: 7 additions & 14 deletions

File tree

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
- run:
7171
name: Set up workspace and install dependencies
7272
command: |
73-
yes | sdkmanager "cmake;3.6.4111459" &
73+
yes | sdkmanager "cmake;3.10.2.4988404" &
7474
mkdir -p "$HERMES_WS_DIR" "$HERMES_WS_DIR/output"
7575
ln -sf "$PWD" "$HERMES_WS_DIR/hermes"
7676
sudo apt-get update
@@ -79,7 +79,7 @@ jobs:
7979
sudo cp /usr/bin/ninja /usr/bin/ninja.real
8080
# See top comment
8181
printf '%s\n' '#!/bin/sh' 'ninja.real -j4 "$@" || ninja.real -j1 "$@"' | sudo tee /usr/bin/ninja
82-
ln -sf /usr/bin/ninja /opt/android/sdk/cmake/3.6.4111459/bin/ninja
82+
ln -sf /usr/bin/ninja /opt/android/sdk/cmake/3.10.2.4988404/bin/ninja
8383
- run:
8484
name: Build Hermes Compiler
8585
command: |

CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@
33
# This source code is licensed under the MIT license found in the
44
# LICENSE file in the root directory of this source tree.
55

6-
if(NOT HERMES_IS_ANDROID)
7-
# We need FindICU from 3.7
8-
cmake_minimum_required(VERSION 3.7.0)
9-
else()
10-
# We'll be using ICU through Java, so we don't need FindICU.
11-
# 3.6.0 is the minimum version shipped with the Android SDK.
12-
cmake_minimum_required(VERSION 3.6.0)
13-
endif()
6+
cmake_minimum_required(VERSION 3.7.0)
147

158
# Set the VERSION variables based on the project command
169
if (POLICY CMP0048)

android/cppruntime/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ android {
2929

3030
externalNativeBuild {
3131
cmake {
32-
version "3.6.0"
32+
version "3.10.2"
3333
path "src/main/cpp/CMakeLists.txt"
3434
buildStagingDirectory = "${rootProject.ext.hermes_ws}/staging/cppruntime"
3535
buildStagingDirectory.mkdirs()

android/cppruntime/src/main/cpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
# This source code is licensed under the MIT license found in the
44
# LICENSE file in the root directory of this source tree.
55

6-
cmake_minimum_required(VERSION 3.6.0)
6+
cmake_minimum_required(VERSION 3.7.0)
77

88
add_library(stub SHARED stub.cpp)

android/hermes/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ android {
3535

3636
externalNativeBuild {
3737
cmake {
38-
version "3.6.0"
38+
version "3.10.2"
3939
path "../../CMakeLists.txt"
4040
buildStagingDirectory = "${rootProject.ext.hermes_ws}/staging/hermes"
4141
buildStagingDirectory.mkdirs()

android/intltest/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ android {
7777

7878
externalNativeBuild {
7979
cmake {
80-
version "3.6.0"
80+
version "3.10.2"
8181
path "../../CMakeLists.txt"
8282
buildStagingDirectory = "${rootProject.ext.hermes_ws}/staging/intl"
8383
buildStagingDirectory.mkdirs()

0 commit comments

Comments
 (0)