Skip to content

Commit

Permalink
Update document
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryAWE committed May 17, 2024
1 parent 4153532 commit baac147
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 30 deletions.
26 changes: 11 additions & 15 deletions doc/en/build.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
# Building
# Building and Installing
## Prerequisites
1. Compiler that supports C++20. Recommended compilers: `MSVC 19.3` (`Visual Studio 2022`) or higher, `GCC 12` or higher, `Clang 15` or higher.
2. `CMake`: `3.20` or higher.
3. `Ninja`

## Build the Project
### Configure
```bash
mkdir build
cd build
cmake ..
Run `build.sh` from the project root directory. For Windows, run `build.ps1` instead.
```sh
./build.sh -DCMAKE_BUILD_TYPE=Release
```
If you need to build examples or unit tests, add the parameter `-Dpapilio_build_example=1` or `-Dpapilio_build_unit_test=1`.
Document for more build options are in the [Custom Build](custom_build.md).
### Compile
```bash
cmake --build .
```
### Run Unit Tests
```bash
ctest .
```ps1
# Windows
./build.ps1 -DCMAKE_BUILD_TYPE=Release
```

## Install the Library
Run `cmake --install` in the `build/` directory.
25 changes: 10 additions & 15 deletions doc/zh-CN/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,17 @@
## 前置要求
1. 任意支持 C++20 的编译器,推荐:`MSVC 19.3``Visual Studio 2022`)或以上、`GCC 12` 或以上、`Clang 15` 或以上
2. `CMake``3.20` 或以上
3. `Ninja`

## 构建项目
### 配置
```bash
mkdir build
cd build
cmake ..
在项目根目录运行 `build.sh`。在 Windows 上运行 `build.ps1` 作为替代。
```sh
./build.sh -DCMAKE_BUILD_TYPE=Release
```
如果需要构建示例或单元测试,请添加参数 `-Dpapilio_build_example=1``-Dpapilio_build_unit_test=1`
更多编译选项的文档在[自定义构建](custom_build.md)中。

### 编译
```bash
cmake --build .
```
### 运行单元测试
```bash
ctest .
```ps1
# Windows
./build.ps1 -DCMAKE_BUILD_TYPE=Release
```

## 安装库
`build/` 目录执行 `cmake --install .` 即可。

0 comments on commit baac147

Please sign in to comment.