Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
beef9999 committed Jun 24, 2024
1 parent b8a2e63 commit 5a31854
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
9 changes: 3 additions & 6 deletions doc/docs/introduction/how-to-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ import TabItem from '@theme/TabItem';
git clone https://github.com/alibaba/PhotonLibOS.git
```

:::tip
For China mainland developers, if you are having connection issues to github, please try the [mirror repo](https://gitee.com/mirrors/photonlibos.git).
:::

### Install dependencies

```mdx-code-block
Expand Down Expand Up @@ -150,7 +146,7 @@ ctest
brew install gflags googletest gsasl

# Build examples and test code
cmake -B build -D PHOTON_BUILD_TESTING=ON
cmake -B build -D OPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 -D PHOTON_BUILD_TESTING=ON
cmake --build build -j 8

# Run all test cases
Expand All @@ -163,7 +159,7 @@ ctest
</Tabs>
```

### Build Options
### Extra Build Options

| Option | Default | Description |
|:-------------------------:|:-------:|:---------------------------------------------------------:|
Expand All @@ -176,6 +172,7 @@ ctest
| PHOTON_ENABLE_SASL | OFF | Enable SASL. Requires `libgsasl` |
| PHOTON_ENABLE_FSTACK_DPDK | OFF | Enable F-Stack and DPDK. Requires both. |
| PHOTON_ENABLE_EXTFS | OFF | Enable extfs. Requires `libe2fs` |
| PHOTON_ENABLE_ECOSYSTEM | OFF | Enable ecosystem tools and wrappers |

#### Case 1. Staitcally build all third-party libs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ brew install cmake openssl pkg-config
```bash
cd PhotonLibOS
cmake -B build
cmake --build build -j
cmake --build build -j 8
```

```mdx-code-block
Expand All @@ -75,7 +75,7 @@ cmake --build build -j
```bash
cd PhotonLibOS
cmake -B build
cmake --build build -j
cmake --build build -j 8
```

```mdx-code-block
Expand All @@ -85,8 +85,8 @@ cmake --build build -j

```bash
cd PhotonLibOS
cmake -B build
cmake --build build -j
cmake -B build -D OPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1
cmake --build build -j 8
```

```mdx-code-block
Expand Down Expand Up @@ -115,7 +115,7 @@ dnf install gtest-devel gmock-devel gflags-devel fuse-devel libgsasl-devel

# Build examples and test code
cmake -B build -D PHOTON_BUILD_TESTING=ON
cmake --build build -j
cmake --build build -j 8

# Run all test cases
cd build
Expand All @@ -133,7 +133,7 @@ apt install libgtest-dev libgmock-dev libgflags-dev libfuse-dev libgsasl7-dev

# Build examples and test code
cmake -B build -D PHOTON_BUILD_TESTING=ON
cmake --build build -j
cmake --build build -j 8

# Run all test cases
cd build
Expand All @@ -150,8 +150,8 @@ ctest
brew install gflags googletest gsasl

# Build examples and test code
cmake -B build -D PHOTON_BUILD_TESTING=ON
cmake --build build -j
cmake -B build -D OPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 -D PHOTON_BUILD_TESTING=ON
cmake --build build -j 8

# Run all test cases
cd build
Expand All @@ -163,7 +163,7 @@ ctest
</Tabs>
```

### 编译选项
### 高级编译选项

| Option | Default | Description |
|:-------------------------:|:-------:|:----------------------------------------------:|
Expand All @@ -176,6 +176,7 @@ ctest
| PHOTON_ENABLE_SASL | OFF | 开启 SASL. 需要 `libgsasl` |
| PHOTON_ENABLE_FSTACK_DPDK | OFF | 开启 F-Stack and DPDK,需要两者的库 |
| PHOTON_ENABLE_EXTFS | OFF | 开启 extfs. 需要 `libe2fs` |
| PHOTON_ENABLE_ECOSYSTEM | OFF | 编译Photon生态库,包含一些三方工具和封装 |

#### 例子1

Expand Down

0 comments on commit 5a31854

Please sign in to comment.