Skip to content

Commit 19ce984

Browse files
authored
update cmake to v3.14 for travis (#20042)
1 parent 3a862ed commit 19ce984

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tools/travis-scripts/before-install.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,29 @@ function install_latest_python()
5050
python -V
5151
}
5252

53+
# update cmake version to 3.14
54+
function update_cmake_to_314()
55+
{
56+
57+
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
58+
curl https://cmake.org/files/v3.14/cmake-3.14.0-Darwin-x86_64.tar.gz -O
59+
tar -xzf cmake-3.14.0-Darwin-x86_64.tar.gz
60+
sudo mv cmake-3.14.0-Darwin-x86_64/CMake.app /Applications
61+
else
62+
# linux system
63+
# build with source code
64+
echo "downloading cmake 3.14.0"
65+
curl https://cmake.org/files/v3.14/cmake-3.14.0.tar.gz > ./cmake-3.14.0.tar.gz
66+
echo "extract cmake 3.14.0"
67+
tar -xzf cmake-3.14.0.tar.gz > /dev/null
68+
cd cmake-3.14.0
69+
echo "build and install cmake 3.14.0"
70+
cmake . > /dev/null
71+
make > /dev/null
72+
sudo make install
73+
fi
74+
}
75+
5376
# set up environment according os and target
5477
function install_environement_for_pull_request()
5578
{
@@ -69,6 +92,8 @@ function install_environement_for_pull_request()
6992
install_python_module_for_osx
7093
fi
7194

95+
update_cmake_to_314
96+
7297
# use NDK's clang to generate binding codes
7398
install_android_ndk
7499
download_deps

0 commit comments

Comments
 (0)