@@ -21,25 +21,29 @@ If a path is printed, `cmake` is installed. To check the version, run `cmake
21
21
The layout of this page is as follows:
22
22
23
23
- [ Installing Dependencies] ( #installing-dependencies )
24
- - [ Install C++ Compiler] ( #install-gcc )
24
+ - [ Install Compiler] ( #install-compiler )
25
25
- [ Install cmake] ( #install-cmake )
26
26
- [ Install JSON libraries] ( #install-json-libraries )
27
27
- [ Install Armadillo (and boost)] ( #install-armadillo-and-boost )
28
28
- [ Install NetCDF (optional)] ( #install-netcdf-optional )
29
29
30
- ## Install gcc
30
+ ## Install Compiler
31
31
32
- On MacOS this can be installed, for
33
- example, using:
32
+ On MacOS this can be installed, for example, using:
34
33
35
34
``` bash
36
- sudo port install gcc11
35
+ sudo port install g++
37
36
```
38
37
38
+ > NOTE: On Macos, cmake will default to using clang instead of gcc.
39
+ You need to set an environmental variable to tell cmake to use g++ instead.
40
+ Do this with ` export CXX=/opt/local/bin/g++ ` ,
41
+ and replace the path if it is placed somewhere different.
42
+
39
43
On Ubuntu, ` gcc ` (the C-compiler) is pre-installed, but the C++ compiler is not. This
40
44
can be installed with (subsituting your machine's package manager command):
41
45
42
- ``bash
46
+ ``` bash
43
47
sudo apt install g++
44
48
```
45
49
@@ -103,7 +107,7 @@ sudo port install lapack
103
107
sudo port install OpenBLAS
104
108
sudo port install boost
105
109
sudo port install armadillo
106
- sudo port install openmpi-bin libopenmpi-dev
110
+ sudo port install openmpi
107
111
```
108
112
109
113
## Install NetCDF (optional)
@@ -122,7 +126,7 @@ sudo port install netcdf-cxx4
122
126
If you want the gcc version of netcdf, then:
123
127
124
128
``` bash
125
- sudo port install netcdf-cxx4 +gcc10
129
+ sudo port install netcdf-cxx4
126
130
```
127
131
128
132
On Ubuntu, gcc is the default compiler, it seems like you can probably just do:
0 commit comments