Skip to content

Commit ace2341

Browse files
committed
cmake rework
1 parent cacbd30 commit ace2341

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,8 @@ include(host)
115115
include(check_deps)
116116

117117
include(cpp)
118-
119-
add_subdirectory(Foo)
120-
add_subdirectory(Bar)
121-
add_subdirectory(FooBar)
122-
add_subdirectory(FooBarApp)
118+
foreach(SUBPROJECT IN ITEMS Foo Bar FooBar FooBarApp)
119+
add_subdirectory(${SUBPROJECT})
120+
endforeach()
123121

124122
add_subdirectory(examples)

ci/README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ ref: https://github.com/docker-library/official-images#architectures-other-than-
5555

5656
ref: https://docs.docker.com/buildx/working-with-buildx/
5757

58-
On you enable qemu support (see above), you can list available platform using:
58+
Once you enable QEMU support (see above), you can list available platform using:
5959
```sh
6060
docker buildx ls
6161
```
@@ -75,29 +75,31 @@ To control the version of CMake, instead of using the
7575
### Install prebuilt
7676

7777
The recommended and faster way is to use the prebuilt version:
78+
7879
```Dockerfile
79-
# Install CMake 3.25.2
80-
RUN wget "https://cmake.org/files/v3.25/cmake-3.25.2-linux-x86_64.sh" \
81-
&& chmod a+x cmake-3.25.2-linux-x86_64.sh \
82-
&& ./cmake-3.25.2-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
83-
&& rm cmake-3.25.2-linux-x86_64.sh
80+
# Install CMake 3.26.4
81+
RUN wget "https://cmake.org/files/v3.26/cmake-3.26.4-linux-x86_64.sh" \
82+
&& chmod a+x cmake-3.26.4-linux-x86_64.sh \
83+
&& ./cmake-3.26.4-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
84+
&& rm cmake-3.26.4-linux-x86_64.sh
8485
```
8586

8687
**warning**: Since [CMake 3.20](https://cmake.org/files/v3.20/) Kitware use a lowercase `linux` instead of `Linux` (e.g. [CMake 3.19](https://cmake.org/files/v3.19/)).
8788

8889
### Build from source
8990

9091
To build from source you can use the following snippet:
92+
9193
```Dockerfile
92-
# Install CMake 3.25.2
93-
RUN wget "https://cmake.org/files/v3.25/cmake-3.25.2.tar.gz" \
94-
&& tar xzf cmake-3.25.2.tar.gz \
95-
&& rm cmake-3.25.2.tar.gz \
96-
&& cd cmake-3.25.2 \
94+
# Install CMake 3.26.4
95+
RUN wget "https://cmake.org/files/v3.26/cmake-3.26.4.tar.gz" \
96+
&& tar xzf cmake-3.26.4.tar.gz \
97+
&& rm cmake-3.26.4.tar.gz \
98+
&& cd cmake-3.26.4 \
9799
&& ./bootstrap --prefix=/usr/local/ \
98100
&& make \
99101
&& make install \
100102
&& cd .. \
101-
&& rm -rf cmake-3.25.2
103+
&& rm -rf cmake-3.26.4
102104
```
103105

0 commit comments

Comments
 (0)