Skip to content

Commit

Permalink
Unify cmake handling for builds that use swiftshader (google#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-baker authored Apr 23, 2020
1 parent 4a757f6 commit f493404
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
17 changes: 7 additions & 10 deletions kokoro/scripts/linux/build-amber.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [ $COMPILER = "clang" ]; then
else
# Specify we want to build with GCC 7 (which supports C++14)
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get update -qq
sudo aptitude install -y gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --set gcc "/usr/bin/gcc-7"
Expand Down Expand Up @@ -67,15 +67,12 @@ then
fi

# removing the old version
echo y | sudo apt-get purge --auto-remove cmake

# Installing the 3.10.2 version
wget http://www.cmake.org/files/v3.10/cmake-3.10.2.tar.gz
tar -xvzf cmake-3.10.2.tar.gz
cd cmake-3.10.2/
./configure
make
sudo make install
sudo apt-get purge -y --auto-remove cmake

# Get newer version of CMake
wget -q https://github.com/Kitware/CMake/releases/download/v3.16.0/cmake-3.16.0-Linux-x86_64.tar.gz
tar xf cmake-3.16.0-Linux-x86_64.tar.gz
export PATH="$PWD/cmake-3.16.0-Linux-x86_64/bin:$PATH"

echo $(date): $(cmake --version)

Expand Down
5 changes: 4 additions & 1 deletion kokoro/scripts/linux/build-clvk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if [ $COMPILER = "clang" ]; then
else
# Specify we want to build with GCC 7 (which supports C++14)
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get update -qq
sudo aptitude install -y gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --set gcc "/usr/bin/gcc-7"
Expand Down Expand Up @@ -76,6 +76,9 @@ wget -q https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linu
unzip -q ninja-linux.zip
export PATH="$PWD:$PATH"

# removing the old version
sudo apt-get purge -y --auto-remove cmake

# Get newer version of CMake
wget -q https://github.com/Kitware/CMake/releases/download/v3.16.0/cmake-3.16.0-Linux-x86_64.tar.gz
tar xf cmake-3.16.0-Linux-x86_64.tar.gz
Expand Down

0 comments on commit f493404

Please sign in to comment.