Skip to content

Commit

Permalink
Update to clang 19
Browse files Browse the repository at this point in the history
  • Loading branch information
carlesfernandez committed Dec 26, 2024
1 parent 71a4b68 commit 0ac5af4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions _geniuss-place/03-coding-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -1077,28 +1077,28 @@ $ brew install clang-format

* **In macOS using Macports:**
```console
$ sudo port install clang-15
$ sudo port install clang-19
```
NOTE: You can see all available choices with `port select --list` for clang:
```console
$ port select --list clang
Available versions for clang:
mp-clang-15
mp-clang-19
none (active)
```
{: class="no-copy"}
With `sudo port select --set clang <version>` you choose one of them as the
new default, which will create symlinks in `/opt/local/bin` without the
version suffix.
```console
$ sudo port select --set clang mp-clang-15
selecting 'mp-clang-15' for 'clang' succeeded. 'mp-clang-15' is now active.
$ sudo port select --set clang mp-clang-19
selecting 'mp-clang-19' for 'clang' succeeded. 'mp-clang-19' is now active.
```
{: class="no-copy"}
You can confirm this change by looking at the version of the tool:
```console
$ clang-format --version
clang-format version 15.0.0
clang-format version 19.1.6
```
{: class="no-copy"}
If you later wish to remove these symlinks in order to avoid hiding tools
Expand Down Expand Up @@ -1229,7 +1229,7 @@ $ ln -s $(brew --prefix llvm)/bin/run-clang-tidy /usr/local/bin

* **In macOS using Macports:**
```console
$ sudo port install clang-15
$ sudo port install clang-19
```

**Step 2.- Apply clang-tidy**
Expand Down
8 changes: 4 additions & 4 deletions _quick-start/03-build-and-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,23 +358,23 @@ $ sudo apt-get install clang
```

Other packages specifying the Clang version, such as `clang-3.4`, `clang-3.8`,
`clang-4.0`, `clang-5.0`, ..., or `clang-15` could exist for your distribution,
`clang-4.0`, `clang-5.0`, ..., or `clang-19` could exist for your distribution,
check its documentation. Once installed, its use can be configured by passing
the following parameters to CMake:

```console
$ cmake -DCMAKE_CXX_COMPILER=/usr/bin/clang++-15 -DCMAKE_C_COMPILER=/usr/bin/clang-15 ..
$ cmake -DCMAKE_CXX_COMPILER=/usr/bin/clang++-19 -DCMAKE_C_COMPILER=/usr/bin/clang-19 ..
```

of course replacing `15` by the actual version installed in your machine. Some
of course replacing `19` by the actual version installed in your machine. Some
distributions drop the version number, so you may just have `/usr/bin/clang++`
and `/usr/bin/clang`.

If you have the Ninja build system installed, you can build GNSS-SDR replacing
GCC and `make` by Clang and Ninja:

```console
$ cmake -DCMAKE_CXX_COMPILER=/usr/bin/clang++-15 -DCMAKE_C_COMPILER=/usr/bin/clang-15 -GNinja ..
$ cmake -DCMAKE_CXX_COMPILER=/usr/bin/clang++-19 -DCMAKE_C_COMPILER=/usr/bin/clang-19 -GNinja ..
```

## Using Xcode
Expand Down

0 comments on commit 0ac5af4

Please sign in to comment.