Skip to content

构建

详细的构建配置和选项说明。

基本构建

bash
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)

构建类型

类型用途优化级别
Release生产渲染-O3
Debug调试开发-O0 -g
RelWithDebInfo性能分析-O2 -g

CMake 选项

bash
# 指定 CUDA 架构
cmake -S . -B build -DCUDA_ARCH=86

# 启用详细编译输出
cmake --build build -- VERBOSE=1

运行测试

bash
# 单元测试
cd build && ctest --output-on-failure

# 属性测试
./tests/property/test_vec3_properties

Technical Whitepaper · Built with VitePress