Skip to content

Commit 9684724

Browse files
authored
docs: Add instructions for building without tests (endless-sky#10602)
1 parent 849653f commit 9684724

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

docs/readme-cmake.md

+16-7
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ In addition to the below dependencies, you will also need CMake 3.16 or newer, h
5959
<summary>DEB-based distros</summary>
6060

6161
```
62-
g++ cmake ninja-build curl libsdl2-dev libpng-dev libjpeg-dev libgl1-mesa-dev libglew-dev libopenal-dev libmad0-dev uuid-dev catch2
62+
g++ cmake ninja-build curl libsdl2-dev libpng-dev libjpeg-dev libgl1-mesa-dev libglew-dev libopenal-dev libmad0-dev uuid-dev
63+
```
64+
Additionally, if you want to build unit tests:
65+
```
66+
catch2
6367
```
6468

6569
</details>
@@ -68,7 +72,11 @@ g++ cmake ninja-build curl libsdl2-dev libpng-dev libjpeg-dev libgl1-mesa-dev li
6872
<summary>RPM-based distros</summary>
6973

7074
```
71-
gcc-c++ cmake ninja-build SDL2-devel libpng-devel libjpeg-turbo-devel mesa-libGL-devel glew-devel openal-soft-devel libmad-devel libuuid-devel catch2-devel
75+
gcc-c++ cmake ninja-build SDL2-devel libpng-devel libjpeg-turbo-devel mesa-libGL-devel glew-devel openal-soft-devel libmad-devel libuuid-devel
76+
```
77+
Additionally, if you want to build unit tests:
78+
```
79+
catch2-devel
7280
```
7381

7482
</details>
@@ -82,11 +90,12 @@ gcc-c++ cmake ninja-build SDL2-devel libpng-devel libjpeg-turbo-devel mesa-libGL
8290
Here's a summary of every command you will need for development:
8391

8492
```bash
85-
$ cmake --preset <preset> # configure project (only needs to be done once)
86-
$ cmake --build --preset <preset>-debug # build Endless Sky (as well as any tests)
87-
$ ctest --preset <preset>-test # run the unit tests
88-
$ ctest --preset <preset>-benchmark # run the benchmarks
89-
$ ctest --preset <preset>-integration # run the integration tests (Linux only)
93+
$ cmake --preset <preset> # configure project (only needs to be done once)
94+
$ cmake --build --preset <preset>-debug # build Endless Sky and all tests
95+
$ cmake --build --preset <preset>-debug --target EndlessSky # build only the game
96+
$ ctest --preset <preset>-test # run the unit tests
97+
$ ctest --preset <preset>-benchmark # run the benchmarks
98+
$ ctest --preset <preset>-integration # run the integration tests (Linux only)
9099
```
91100

92101
The executable will be located in `build/<preset>/Debug/`. If you'd like to debug a specific integration test (on any OS), you can do so as follows:

docs/readme-developer.md

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Use your favorite package manager to install the following (version numbers may
2525
- libopenal-dev
2626
- libmad0-dev
2727
- uuid-dev
28+
29+
Additionally, if you want to build unit tests:
2830
- catch2
2931

3032
##### RPM-based distros:
@@ -38,6 +40,8 @@ Use your favorite package manager to install the following (version numbers may
3840
- openal-soft-devel
3941
- libmad-devel
4042
- libuuid-devel
43+
44+
Additionally, if you want to build unit tests:
4145
- catch2-devel
4246

4347
Then, from the project root folder, simply type:

0 commit comments

Comments
 (0)