Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CMakeLists.txt.googletest #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt.googletest
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ project(googletest-download NONE)
include(ExternalProject)
ExternalProject_Add(googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG master
GIT_TAG main
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
)
42 changes: 30 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,55 @@ Each function has a commented section above it explaining the inputs required fo

The primary purpose of the provided software is to be easy to read and educational, reinforcing the concepts in the book. The code is optimized neither for efficiency nor robustness.

## Installation
## Installation

### 1. Install Eigen library.
* On Mac
### 1. Install Software
* Eigen Library: On Linux and Mac
```console
foo@bar:~$ brew install eigen
foo@bar:~$ sudo apt-get install libeigen3-dev
```
* On Linux
* Eigen Libray: Mac
```console
foo@bar:~$ sudo apt-get install libeigen3-dev
foo@bar:~$ brew install eigen
```

### 2. Prepare build
* cmake: On Linux
```console
foo@bar:~$ sudo apt-get install cmake
```
```console
foo@bar:~$ mkdir build && cd build
```

By default cmake will install our build into the system directories.
To define a custom install directory we simply pass it to cmake:
### 2. Download Repo
* Download Repo:
```console
foo@bar:~$
```
* Extract Repo:
```console
foo@bar:~$ sudo unzip
```

### 3. Prepare build
```console
foo@bar:build $ cmake .. -DCMAKE_INSTALL_PREFIX=../_install
foo@bar:~$ mkdir build && cd build
```

Or just configure with defaults
```console
foo@bar:build $ cmake ..
```
Building and installing library
Building library
```console
foo@bar:build $ sudo make
```
Installing library
```console
foo@bar:build $ make all && make install
foo@bar:build $ sudo make install
```


## Testing the library
```console
foo@bar:build $ ./lib_test
Expand Down