Jumpstart a C++ project in no time
This is a cross-plateform (Linux/OSX/Windows) CMake based C++ template shipped with :
- Continuous Integration with Travis CI & Appveyor
- Unit testing with Catch
- Documentation with Doxygen
- Code coverage with CodeCov
Each of these features can be disabled / enabled if needed
You can skip this if you just want to use the CMake template without additional features. Otherwise, the following dependencies have to be installed :
doxygen
boost test-unit-framework
lcov
The template is shipped with extra features disabled. Just clone or fork the repository, and follow the usual CMake build from the project directory :
mkdir build
cd build
cmake ..
make
By default, two targets are generated: an executable in bin/, and a library in lib/ The CMake configuration accepts the following options :
- -DENABLE_DOC=1 : Generates the documentation target
- -DENABLE_TEST=1 : Turns on testing
- -DENABLE_COVERAGE=1 : Generates the coverage build
cmake -DENABLE_DOC=1 ..
make doc
Generates the doxygen documentation in doc/html A base doxygen configuration is provided in doc/documentation-config.doxygen.in, along with a few page templates.
cmake -DENABLE_TESTING=1 ..
make test
Runs the tests defined in test
cmake -DENABLE_COVERAGE=1 ..
make test
Enabling code coverage automatically enables unit testing. Running the test generates a coverage report
Integration with Travis CI is configured in .travis.yml The default configuration builds and run tests on different version of Ubuntu & OSX, and generate a coverage report
Integration with Appveyor is configured in appveyor.yml The default configuration builds and run tests on different Visual Studio generators
Integration with CodeCov is configured in .codecov.yml The default Travis configuration automatically push the coverage report to CodeCov.io
If you think something is missing, feel free to open an issue or give me a hint. To contribute to the repository :
- Fork it (https://github.com/yourname/yourproject/fork)
- Create your feature branch (git checkout -b feature/fooBar)
- Commit your changes (git commit -am 'Add some fooBar')
- Push to the branch (git push origin feature/fooBar)
- Create a new Pull Request