https://github.com/thinkinglabs/kata-bootstrap-cpp-googletest
Bootstrap project for CPP kata's using Google Test
https://github.com/thinkinglabs/kata-bootstrap-cpp-googletest
bootstrap conan-io cpp googletest kata
Last synced: 3 months ago
JSON representation
Bootstrap project for CPP kata's using Google Test
- Host: GitHub
- URL: https://github.com/thinkinglabs/kata-bootstrap-cpp-googletest
- Owner: thinkinglabs
- Created: 2017-12-14T20:18:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-17T13:28:24.000Z (about 7 years ago)
- Last Synced: 2025-01-13T12:21:57.849Z (5 months ago)
- Topics: bootstrap, conan-io, cpp, googletest, kata
- Language: CMake
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kata Bootstrap for CPP and Google Test
This is a bootstrap project for kata's in CPP using Google Test.
The project makes use of [Conan.io](https://conan.io/) to download the Google Test library as a dependency. It's a simplified setup as tests are located in the main sources. As a result the binary produced by this project is the test runner.
A better option would be to locate tests in the sources sub-directory of the `test_package` directory and make use of Conan.io's [`test`](http://docs.conan.io/en/latest/reference/commands/creator/test.html) command. This way of working has been implemented for [Fizzbuzz kata in cpp using Catch and Conan.io](https://github.com/thinkinglabs/kata-bootstrap-cpp-catch).
## Basic Setup
To install Conan:
```
$ pip install conan
```## Build
To build the project:
```
$ conan install . --build=gtest -if ./build && conan build . -bf ./build
```All of this is also done by `./build.sh`.
After having build the project for the first time, you can rebuild it from the `./build` folder using `make`:
```
$ cd build
$ make
```## Run unit tests
To run the unit tests:
```
$ cd build
$ make test
```or
```
$ cd build
$ ctest
```If you want more verbosity:
```
$ ctest -V
```## Clean up
To clean up the project, just delete the `./build` folder:
```
$ rm -rf build
```