Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ibab/cpp-template
Allows you to quickly start a new C++ project
https://github.com/ibab/cpp-template
Last synced: about 1 month ago
JSON representation
Allows you to quickly start a new C++ project
- Host: GitHub
- URL: https://github.com/ibab/cpp-template
- Owner: ibab
- Created: 2014-02-04T18:33:00.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-06-16T12:09:09.000Z (over 8 years ago)
- Last Synced: 2023-03-23T02:05:37.993Z (almost 2 years ago)
- Language: CMake
- Size: 60.5 KB
- Stars: 12
- Watchers: 1
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# C++ CMake template
Setting up a new CMake project can consume a lot of time, especially if you want to set up dependencies,
generate documentation and set up automated testing.This CMake template speeds up the process by providing a complete project with C++11, Doxygen and googletest integration.
When using it for the first time, run$ python init.py
and answer a few questions (name, version, ...) to initialize your project.
This will customize the name of the executable, the documentation, and so on.To build the project, run
$ mkdir build
$ cd build
$ cmake ..
$ makeBy default, the project will be compiled to both a library and an executable (via main.cpp).
You can add additional source files in `src/CMakeLists.txt` by modifying the lineset(SRC ...)
### Doxygen
Documentation can be generated with
$ make doc
A tutorial on the doxygen syntax can be found [here](http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html).
### googletest
You can also make use of the googletest library to write and execute automated tests.
Simply create new tests in the `test` directory.
They will be automatically compiled into an executable and can be run withmake check
For an introduction to writing tests with googletest, follow [this link](http://code.google.com/p/googletest/wiki/Primer).