Skip to content

Commit f03e8e9

Browse files
committed
docker: Install a newer CMake
LLVM 17 requires CMake 3.20 or newer, while Ubuntu 20.04 ships with CMake 3.16.3.
1 parent c18225c commit f03e8e9

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ RUN apt-get update -qq && \
88
apt-get clean -y && \
99
rm -rf /var/lib/apt/lists/*
1010

11+
# Manually install a newer version of CMake; this is needed since building
12+
# LLVM requires CMake 3.20, while Ubuntu 20.04 ships with 3.16.3. If
13+
# updating to a newer distribution, this can be dropped.
14+
RUN cd /opt && \
15+
curl -LO https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-Linux-$(uname -m).tar.gz && \
16+
tar -zxf cmake-*.tar.gz && \
17+
rm cmake-*.tar.gz && \
18+
mv cmake-* cmake
19+
ENV PATH=/opt/cmake/bin:$PATH
20+
21+
1122
RUN git config --global user.name "LLVM MinGW" && \
1223
git config --global user.email root@localhost
1324

Dockerfile.dev

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ RUN apt-get update -qq && \
88
apt-get clean -y && \
99
rm -rf /var/lib/apt/lists/*
1010

11+
# Manually install a newer version of CMake; this is needed since building
12+
# LLVM requires CMake 3.20, while Ubuntu 20.04 ships with 3.16.3. If
13+
# updating to a newer distribution, this can be dropped.
14+
RUN cd /opt && \
15+
curl -LO https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-Linux-$(uname -m).tar.gz && \
16+
tar -zxf cmake-*.tar.gz && \
17+
rm cmake-*.tar.gz && \
18+
mv cmake-* cmake
19+
ENV PATH=/opt/cmake/bin:$PATH
20+
21+
1122
RUN git config --global user.name "LLVM MinGW" && \
1223
git config --global user.email root@localhost
1324

0 commit comments

Comments
 (0)