https://github.com/temken/template_cpp_cmake
A template for c++ projects with cmake, travis CI, googletest, and codecov.
https://github.com/temken/template_cpp_cmake
Last synced: 4 months ago
JSON representation
A template for c++ projects with cmake, travis CI, googletest, and codecov.
- Host: GitHub
- URL: https://github.com/temken/template_cpp_cmake
- Owner: temken
- License: mit
- Created: 2020-05-02T07:35:15.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2023-03-21T12:18:31.000Z (over 3 years ago)
- Last Synced: 2025-01-17T22:17:41.922Z (over 1 year ago)
- Language: CMake
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/temken/template_cpp_cmake/actions)
[](https://codecov.io/gh/temken/template_cpp_cmake)
[](https://opensource.org/licenses/MIT)
# SOFTWARETITLE
A template for C++ projects built with CMake.
## General notes
- build with [CMake](https://cmake.org/)
- continuous integration with [Github Actions](https://github.com/actions)
- unit testing with [googletest](https://github.com/google/googletest)
- code coverage with [codecov](https://codecov.io/).
Repository content
The included folders are:
- *bin/*: This folder contains the executable after successful installation together with the configuration files.
- *data/*: Contains additional data necessary for the simulations, e.g. the solar model tables.
- *external/*: This folder will only be created and filled during the build with CMake.
- *include/*: All header files of SOFTWARETITLE can be found here.
- *results/*: Each run of SOFTWARETITLE generates result files in a dedicated sub-folder named after the run's simulation ID string, which is specified in the configuration file.
- *src/*: Here you find the source code of SOFTWARETITLE.
- *tests/*: All code and executable files of the unit tests are stored here.
## Getting started
1. Dependencies
Before we can install SOFTWARENAME, we need to make sure that a few dependencies are taken care of.
- [CMake](https://cmake.org/): SOFTWARENAME is built with CMake.
2. Downlad & Installation
The SOFTWARENAME source code can be downloaded by cloning this git repository:
```
>git clone https://github.com/temken/SOFTWARENAME.git
>cd SOFTWARENAME
```
The code is compiled and the executable is created using CMake.
```
>cmake -E make_directory build
>cd build
>cmake -DCMAKE_BUILD_TYPE=Release -DCODE_COVERAGE=OFF ..
>cmake --build . --config Release
>cmake --install .
```
If everything worked well, there should be the executable *SOFTWARENAME* in the */bin/* folder.
3. Usage
Once SOFTWARENAME is installed, it can run by running the following command from the */bin/* folder:
```
>./SOFTWARENAME
```
## Version History
- xx.xx.20xx: Release of version 0.1.0
## Everything else
Citing SOFTWARENAME
If you decide to use this code, please cite the latest archived version,
> Emken, T., 20xx, SOFTWARENAME [Code, v0.1.0], Astrophysics Source Code Library, record [[ascl:xxxx.xxx]](https://ascl.net/xxxx.xxx), [[DOI:10.5281/zenodo.xxxxxxx]](https://doi.org/10.5281/zenodo.xxxxxxx)
Bibtex entry:
```
@software{SOFTWARENAME,
author = {Emken, Timon},
title = {{SOFTWARENAME [Code, v0.1.0]}},
year = {20xx},
publisher = {Zenodo},
version = {v0.1.0},
doi = {DOI:10.5281/zenodo.xxxxxxx},
url = {https://doi.org/10.5281/zenodo.xxxxxxx},
howpublished={Astrophysics Source Code Library record \href{https://ascl.net/xxxx.xxx}{[ascl:xxxx.xxx]}. The code can be found under \url{https://github.com/temken/SOFTWARENAME}. Version 0.1.1 is archived as \href{https://doi.org/10.5281/zenodo.xxxxxxx}{DOI:10.5281/zenodo.5957388}}
}
```
Author & Contact
The author of SOFTWARENAME is Timon Emken.
For questions, bug reports or other suggestions please open an [issue](https://github.com/temken/SOFTWARENAME/issues).
License
This project is licensed under the MIT License - see the LICENSE file.