Skip to content

Commit 3cacb43

Browse files
committed
Update README
1 parent b4757d3 commit 3cacb43

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,30 @@ and more.
8686

8787
### Option 2: Using CMake
8888

89-
CMake support is still under development.
89+
To build for CPUs, follow these steps in the `amrexpr` root directory:
90+
91+
```console
92+
$ cmake -S . -B build -DCMAKE_INSTALL_PREFIX=<installation_direction>
93+
$ cmake --build build -j 8
94+
$ cmake --install build
95+
```
96+
97+
To build for GPUs, we use the `ENABLE_[CUDA|HIP|SYCL]` option and specify
98+
the GPU architecture in the configure step. For example
99+
100+
```console
101+
# Nvidia GPU w/ compute capability 8.0
102+
$ cmake -S . -B build -DCMAKE_INSTALL_PREFIX=<installation_direction> \
103+
-DENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=80
104+
105+
# Nvidia GPU w/ compute capability 8.0
106+
$ cmake -S . -B build -DCMAKE_INSTALL_PREFIX=<installation_direction> \
107+
-DENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=80
108+
109+
# Nvidia GPU w/ compute capability 8.0
110+
$ cmake -S . -B build -DCMAKE_INSTALL_PREFIX=<installation_direction> \
111+
-DENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=80
112+
```
90113

91114
## Copyright Notice
92115

0 commit comments

Comments
 (0)