Skip to content

Commit

Permalink
Update macOS.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ehinrichs committed Apr 2, 2024
1 parent 48161bb commit 2f7fb88
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion cmake/macOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,32 @@ gfortran-mp-13
The MacPorts compilers shown above do not have this precision issue.


## Compilers using Homebrew

Prior to installing compilers, you must have a working git, https://github.com/git-guides/install-git, and homebrew, https://github.com/homebrew, install.

```
brew install cmake
brew install make
brew install gcc
brew install wget
```
It may be necessary to export your compiler path as MACs like to use Clang whenever possible

```
export PATH=/usr/local/bin:$PATH
```

It some cases, creating an alias also helps:
```
alias gcc="gcc-13"
alias g++="g++-13"
alias cc="cc-13"
alias c++="c++-13"
```


When you run
```
gcc –version
```
it should now list homebrew rather than clang.

0 comments on commit 2f7fb88

Please sign in to comment.