File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,30 @@ and more.
86
86
87
87
### Option 2: Using CMake
88
88
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
+ ```
90
113
91
114
## Copyright Notice
92
115
You can’t perform that action at this time.
0 commit comments