Skip to content

Commit ec64092

Browse files
committed
osx/linux cmake prebuilt binaries selection
1 parent b9322bf commit ec64092

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

ci_build.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,21 @@ JOBS=2
1414

1515
cmake_install() {
1616
local CMAKE_INSTALL_DIR=/tmp/cmake.root
17+
local CMAKE_SUFFIX="none"
18+
19+
if [ $TRAVIS_OS_NAME = "linux" ]; then
20+
set CMAKE_SUFFIX="linux-x86_64"
21+
elif [ $TRAVIS_OS_NAME = "osx" ]; then
22+
set CMAKE_SUFFIX="macos-universal"
23+
else
24+
echo "TRAVIS_OS_NAME $TRAVIS_OS_NAME not expected"
25+
exit 1
26+
fi
27+
1728
mkdir -p $CMAKE_INSTALL_DIR
18-
wget -qO- "https://cmake.org/files/v3.20/cmake-3.20.5-linux-x86_64.tar.gz" \
29+
wget -qO- "https://cmake.org/files/v3.20/cmake-3.20.5-$CMAKE_SUFFIX.tar.gz" \
1930
| tar --strip-components=1 -xz -C $CMAKE_INSTALL_DIR
31+
2032
export PATH=$CMAKE_INSTALL_DIR/bin:$PATH
2133
cmake --version
2234
}

0 commit comments

Comments
 (0)