Skip to content

Commit

Permalink
Fix CMake build on Travis CI by always using the latest CMake version
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscoPombal authored and arvidn committed Oct 18, 2020
1 parent 12a1bee commit 3d48e7d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,16 @@ install:
- ccache --show-stats
- ccache --zero-stats

# CMake from Kitware is installed in /usr/bin. TravisCI installs its own cmake to another location
# which overrides other installations if they don't call the new binary directly
# Install and prepend a symlink to the latest version to PATH so that it gets used instead.
- if [[ "$cmake" == "1" ]]; then
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null;
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main';
sudo apt install cmake;
sudo mkdir -p /usr/local/cmake-latest/bin;
sudo ln -s /usr/bin/cmake /usr/local/cmake-latest/bin/cmake;
PATH=/usr/local/cmake-latest/bin:$PATH;
which cmake;
cmake --version;
fi
Expand Down

0 comments on commit 3d48e7d

Please sign in to comment.