Added the installation guide for Ubuntu (#489)

* Initial CLA Requirement

* Added Installation steps to the Readme.md

* Fixed error in running benchmark of Installation

* Remove unwanted commands

Removed the lengthy install procedure with suggested install mechanism
This commit is contained in:
Kishan Kumar 2017-11-29 23:21:19 +05:45 committed by Dominic Hamon
parent ec5684ed75
commit eae42212ce
3 changed files with 35 additions and 0 deletions

View File

@ -27,6 +27,7 @@ JianXiong Zhou <zhoujianxiong2@gmail.com>
Joao Paulo Magalhaes <joaoppmagalhaes@gmail.com>
Jussi Knuuttila <jussi.knuuttila@gmail.com>
Kaito Udagawa <umireon@gmail.com>
Kishan Kumar <kumar.kishan@outlook.com>
Lei Xu <eddyxu@gmail.com>
Matt Clarkson <mattyclarkson@gmail.com>
Maxim Vafin <maxvafin@gmail.com>

View File

@ -40,6 +40,7 @@ JianXiong Zhou <zhoujianxiong2@gmail.com>
Joao Paulo Magalhaes <joaoppmagalhaes@gmail.com>
Jussi Knuuttila <jussi.knuuttila@gmail.com>
Kai Wolf <kai.wolf@gmail.com>
Kishan Kumar <kumar.kishan@outlook.com>
Kaito Udagawa <umireon@gmail.com>
Lei Xu <eddyxu@gmail.com>
Matt Clarkson <mattyclarkson@gmail.com>

View File

@ -13,6 +13,39 @@ IRC channel: https://freenode.net #googlebenchmark
[Additional Tooling Documentation](docs/tools.md)
## Installation Guide
For Ubuntu and Debian Based System
First make sure you have git and cmake installed (If not please install it)
```
sudo apt-get install git
sudo apt-get install cmake
```
Now, let's clone the repository and build it
```
git clone https://github.com/google/benchmark.git
cd benchmark
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RELEASE
make
```
We need to install the library globally now
```
sudo make install
```
Now you have google/benchmark installed in your machine
Note: Don't forget to link to pthread library while building
## Example usage
### Basic usage
Define a function that executes the code to be measured.