Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
b1fbb342
Commit
b1fbb342
authored
Jul 20, 2018
by
Ge Jun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move gtest installation before compilation
parent
38eacc9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
26 deletions
+28
-26
getting_started.md
docs/cn/getting_started.md
+28
-26
No files found.
docs/cn/getting_started.md
View file @
b1fbb342
...
...
@@ -38,6 +38,12 @@ If you need to enable cpu/heap profilers in examples:
$
sudo
apt-get
install
libgoogle-perftools-dev
```
If you need to run tests, install and compile libgtest-dev (which is not compiled yet):
```
shell
$
sudo
apt-get
install
libgtest-dev
&&
cd
/usr/src/gtest
&&
sudo
cmake
.
&&
sudo
make
&&
sudo mv
libgtest
*
/usr/lib/
&&
cd
-
```
The directory of gtest source code may be changed, try
`/usr/src/googletest/googletest`
if
`/usr/src/gtest`
is not there.
### Compile brpc with config_brpc.sh
git clone brpc, cd into the repo and run
```
shell
...
...
@@ -64,17 +70,12 @@ $ ./echo_client
Examples link brpc statically, if you need to link the shared version,
`make clean`
and
`LINK_SO=1 make`
**Run tests**
Install and compile libgtest-dev (which is not compiled yet):
```
shell
$
sudo
apt-get
install
libgtest-dev
&&
cd
/usr/src/gtest
&&
sudo
cmake
.
&&
sudo
make
&&
sudo mv
libgtest
*
/usr/lib/
&&
cd
-
$
cd test
$
make
$
sh run_tests.sh
```
The directory of gtest source code may be changed, try
`/usr/src/googletest/googletest`
if
`/usr/src/gtest`
is not there.
Rerun
`config_brpc.sh`
,
`make`
in test/, and
`sh run_tests.sh`
### Compile brpc with cmake
```
shell
$
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
...
...
@@ -97,9 +98,6 @@ $ ./echo_client
Examples link brpc statically, if you need to link the shared version, use
`cmake -DEXAMPLE_LINK_SO=ON ..`
**Run tests**
Install gtest like just written above.
```
shell
$
mkdir
build
&&
cd
build
&&
cmake
-DBUILD_UNIT_TESTS
=
ON ..
&&
make
$
cd test
&&
sh run_tests.sh
...
...
@@ -129,6 +127,11 @@ If you need to enable cpu/heap profilers in examples:
$
sudo
yum
install
gperftools-devel
```
If you need to run tests, install and compile gtest-devel (which is not compiled yet):
```
shell
$
sudo
yum
install
gtest-devel
```
### Compile brpc with config_brpc.sh
git clone brpc, cd into the repo and run
...
...
@@ -157,10 +160,11 @@ $ ./echo_client
Examples link brpc statically, if you need to link the shared version,
`make clean`
and
`LINK_SO=1 make`
**Run tests**
Install gtest-devel.
Rerun
`config_brpc.sh`
,
`make`
in test/, and
`sh run_tests.sh`
```
shell
$
cd test
$
make
$
sh run_tests.sh
```
### Compile brpc with cmake
```
shell
...
...
@@ -185,7 +189,6 @@ $ ./echo_client
Examples link brpc statically, if you need to link the shared version, use
`cmake -DEXAMPLE_LINK_SO=ON ..`
**Run tests**
```
shell
$
mkdir
build
&&
cd
build
&&
cmake
-DBUILD_UNIT_TESTS
=
ON ..
&&
make
$
cd test
&&
sh run_tests.sh
...
...
@@ -266,7 +269,12 @@ $ brew install gflags protobuf leveldb
If you need to enable cpu/heap profilers in examples:
```
shell
$
brew
install
google-perftools
$
brew
install
gperftools
```
If you need to run tests, install and compile googletest (which is not compiled yet):
```
shell
$
git clone https://github.com/google/googletest
&&
cd
googletest/googletest
&&
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
&&
sudo mv
libgtest
*
/usr/lib/
&&
cd
-
```
### Compile brpc with config_brpc.sh
...
...
@@ -293,15 +301,12 @@ $ ./echo_client
Examples link brpc statically, if you need to link the shared version,
`make clean`
and
`LINK_SO=1 make`
**Run tests**
Install and compile googletest (which is not compiled yet):
```
shell
$
git clone https://github.com/google/googletest
&&
cd
googletest/googletest
&&
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
&&
sudo mv
libgtest
*
/usr/lib/
&&
cd
-
$
cd test
$
make
$
sh run_tests.sh
```
Rerun
`config_brpc.sh`
,
`make`
in test/, and
`sh run_tests.sh`
### Compile brpc with cmake
```
shell
$
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
...
...
@@ -323,9 +328,6 @@ $ ./echo_client
Examples link brpc statically, if you need to link the shared version, use
`cmake -DEXAMPLE_LINK_SO=ON ..`
**Run tests**
Install gtest like just written above.
```
shell
$
mkdir
build
&&
cd
build
&&
cmake
-DBUILD_UNIT_TESTS
=
ON ..
&&
make
$
cd test
&&
sh run_tests.sh
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment