Skip to content

Commit 561ccdd

Browse files
authored
Merge pull request #1431 from PowerGridModel/pgm/feature/update-ubuntu-build-guide
Docs: update ubuntu example setup for quicker start
2 parents 80d30db + af102b9 commit 561ccdd

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

docs/advanced_documentation/build-guide.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -235,39 +235,39 @@ To list the available presets, run `./build.sh -h`.
235235
In this section an example is given for setup in Ubuntu 24.04.
236236
You can use this example in Windows Subsystem for Linux (WSL), or in a physical/virtual machine.
237237
238-
### Ubuntu Software Packages
238+
While you can use `apt`, setup via [Homebrew](https://brew.sh) has proved to be much simpler.
239+
In addition, the recommended way to get the [C++ packages](#c) and `uv` is via [Homebrew](https://brew.sh).
239240
240-
Install the minimum required packages:
241+
### Set-up Homebrew
241242
242-
```shell
243-
sudo apt update && sudo apt -y upgrade
244-
sudo apt install -y build-essential gcc g++ clang-18 make ninja-build pkg-config
245-
```
243+
Follow the setup guidelines in [Homebrew](https://brew.sh).
244+
For optimal user experience on Linux, also consider installing the
245+
[requirements](https://docs.brew.sh/Homebrew-on-Linux#requirements) as well.
246246
247-
The following packages are optional depending on your use case:
247+
At the time of writing, the set-up is done as follows:
248248
249249
```shell
250-
sudo apt install -y gcovr lcov # For coverage reports
251-
sudo apt install -y gdb # For debugging
252-
sudo apt install -y wget curl zip unzip tar git # General use tools
250+
sudo apt update && sudo apt -y upgrade # make sure you're up to date
251+
sudo apt install build-essential gcc g++ clang-18 procps curl file git # install initial dependencies
253252
```
254253
255-
### C++ Dependencies for CMake
254+
Then install Homebrew using the setup recommendations in [Homebrew](https://brew.sh).
255+
256+
### C++ Dependencies + Build Requirements
256257
257258
The recommended way to get the [C++ packages](#c) and `uv` is via [Homebrew](https://brew.sh):
258259
259260
```shell
260-
brew install boost eigen nlohmann-json msgpack-cxx doctest cmake uv
261+
brew install \
262+
gdb gcovr lcov lld cmake ninja \
263+
boost eigen nlohmann-json msgpack-cxx doctest uv
261264
```
262265
263-
### Environment variables
264-
265-
Append the following lines into the file `${HOME}/.bashrc`.
266+
Append the following lines into the file `${HOME}/.bashrc` (required for `scikit-build` for the Python installation):
266267
267268
```shell
268-
export CXX=clang++-18 # or g++-14
269-
export CC=clang-18 # or gcc-14
270-
export CMAKE_PREFIX_PATH=/home/linuxbrew/.linuxbrew # only needed for CMake builds
269+
export CXX=clang++ # or g++ or g++-14 or ...
270+
export CC=clang # or gcc or gcc-14 or ...
271271
export LLVM_COV=llvm-cov-18 # only if you want to use one of the llvm features
272272
export CLANG_TIDY=clang-tidy-18 # only if you want to use one of the clang-tidy presets
273273
```
@@ -458,7 +458,6 @@ As a quick start, from the root of the repository:
458458
459459
```{note}
460460
Test coverage is not supported on macOS.
461-
```
462461
463462
## Package tests
464463

0 commit comments

Comments
 (0)