Building
Prerequisites
RXMesh supports Ubuntu, Windows, and WSL. To build the library, you will need:
- CUDA Toolkit ≥ 11.1.0
- A C++17-capable compiler (e.g., GCC 9+, MSVC 2019+, Clang 10+)
- CMake ≥ 3.24
- Git
- An NVIDIA GPU with compute capability 7.0 or higher (Volta and newer) for running the applications
If you are using WSL, ensure your distribution is correctly configured to access the GPU via WSL 2 and CUDA.
On Ubuntu, to enable visualization (via Polyscope), you may need to install OpenGL-related packages:
This ensures that GUI-based rendering works correctly on most Ubuntu systems.Dependencies
RXMesh relies on the following libraries:
- OpenMesh – reference CPU implementation
- RapidJSON – benchmarking results output
- rapidobj – Loading OBJ files
- GoogleTest – unit testing
- spdlog – logging and diagnostics
- glm – small vector/matrix operations
- Eigen – linear algebra backend
- Polyscope – mesh visualization
- cereal – serialization
- METIS – mesh partitioning
- CLI11 – command-line argument parsing
- cuBQL – GPU bounding volume hierarchy queries
Optional:
- SuiteSparse – sparse direct solvers (enabled with
RX_USE_SUITESPARSE=ON) - cuDSS – NVIDIA GPU direct sparse solver (enabled with
RX_USE_CUDSS=ON, requires a separate install)
All required dependencies are automatically downloaded and built via CMake (no manual installation needed).
Compilation
To compile RXMesh and its test/apps:
git clone https://github.com/owensgroup/RXMesh.git
cd RXMesh
mkdir build
cd build
cmake ..
cmake --build . --config Release --parallel 8
This will build all targets, including unit tests and example applications.
To build only a specific target:
Replace
<target_name>with the name of the app/test you want.
Optional CMake Flags
You can customize the build using the following CMake options:
| Option | Default | Description |
|---|---|---|
RX_USE_POLYSCOPE |
ON |
Enable Polyscope for visualization. |
RX_BUILD_TESTS |
ON |
Build RXMesh unit tests. |
RX_BUILD_APPS |
ON |
Build RXMesh example applications. |
RX_USE_DOUBLE |
OFF |
Use double precision for reading input vertex coordinates. |
RX_USE_SUITESPARSE |
OFF |
Enable SuiteSparse sparse direct solvers. |
RX_USE_CUDSS |
OFF |
Enable NVIDIA cuDSS direct solver (requires cuDSS). |
To disable any of these options, simply pass them to cmake when configuring: