mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-08-31 14:11:14 +02:00
deploy: dd055e846c
This commit is contained in:
parent
5bed31b5dd
commit
44aeb2a243
15 changed files with 18 additions and 18 deletions
|
@ -51,7 +51,7 @@
|
|||
<h1>
|
||||
Greeter
|
||||
</h1>
|
||||
<p><a name="md_README"></a><a href="https://github.com/TheLartians/ModernCppStarter/actions"><img class="m-image" src="https://github.com/TheLartians/ModernCppStarter/workflows/MacOS/badge.svg" alt="Image" /></a> <a href="https://github.com/TheLartians/ModernCppStarter/actions"><img class="m-image" src="https://github.com/TheLartians/ModernCppStarter/workflows/Windows/badge.svg" alt="Image" /></a> <a href="https://github.com/TheLartians/ModernCppStarter/actions"><img class="m-image" src="https://github.com/TheLartians/ModernCppStarter/workflows/Ubuntu/badge.svg" alt="Image" /></a> <a href="https://github.com/TheLartians/ModernCppStarter/actions"><img class="m-image" src="https://github.com/TheLartians/ModernCppStarter/workflows/Style/badge.svg" alt="Image" /></a> <a href="https://github.com/TheLartians/ModernCppStarter/actions"><img class="m-image" src="https://github.com/TheLartians/ModernCppStarter/workflows/Install/badge.svg" alt="Image" /></a> <a href="https://codecov.io/gh/TheLartians/ModernCppStarter"><img class="m-image" src="https://codecov.io/gh/TheLartians/ModernCppStarter/branch/master/graph/badge.svg" alt="Image" /></a></p><img class="m-image" src="https://repository-images.githubusercontent.com/254842585/4dfa7580-7ffb-11ea-99d0-46b8fe2f4170" alt="Image" /><section id="autotoc_md0"><h2><a href="#autotoc_md0">ModernCppStarter</a></h2><p>Setting up a new C++ project usually requires a significant amount of preparation and boilerplate code, even more so for modern C++ projects with tests, executables and continuous integration. This template is the result of learnings from many previous projects and should help reduce the work required to setup up a modern C++ project.</p><section id="autotoc_md1"><h3><a href="#autotoc_md1">Features</a></h3><ul><li><a href="https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/">Modern CMake practices</a></li><li>Suited for single header libraries and projects of any scale</li><li>Clean separation of library and executable code</li><li>Integrated test suite</li><li>Continuous integration via <a href="https://help.github.com/en/actions/">GitHub Actions</a></li><li>Code coverage via <a href="https://codecov.io">codecov</a></li><li>Code formatting enforced by <a href="https://clang.llvm.org/docs/ClangFormat.html">clang-format</a> and <a href="https://github.com/cheshirekow/cmake_format">cmake-format</a> via <a href="https://github.com/TheLartians/Format.cmake">Format.cmake</a></li><li>Reproducible dependency management via <a href="https://github.com/TheLartians/CPM.cmake">CPM.cmake</a></li><li>Installable target with automatic versioning information and header generation via <a href="https://github.com/TheLartians/PackageProject.cmake">PackageProject.cmake</a></li><li>Automatic <a href="https://thelartians.github.io/ModernCppStarter">documentation</a> and deployment with <a href="https://www.doxygen.nl">Doxygen</a> and <a href="https://pages.github.com">GitHub Pages</a></li><li>Support for <a href="#additional-tools">sanitizer tools, and more</a></li></ul></section><section id="autotoc_md2"><h3><a href="#autotoc_md2">Usage</a></h3><section id="autotoc_md3"><h4><a href="#autotoc_md3">Adjust the template to your needs</a></h4><ul><li>Use this repo <a href="https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template">as a template</a> and replace all occurrences of "Greeter" in the relevant CMakeLists.txt with the name of your project</li><li>Replace the source files with your own</li><li>For header-only libraries: see the comments in <a href="CMakeLists.txt">CMakeLists.txt</a></li><li>Add <a href="https://docs.codecov.io/docs/quick-start">your project's codecov token</a> to your project's github secrets under <code>CODECOV_TOKEN</code></li><li>Happy coding!</li></ul><p>Eventually, you can remove any unused files, such as the standalone directory or irrelevant github workflows for your project. Feel free to replace the License with one suited for your project.</p><p>To cleanly separate the library and subproject code, the outer <code>CMakeList.txt</code> only defines the library itself while the tests and other subprojects are self-contained in their own directories. During development it is usually convenient to <a href="#build-everything-at-once">build all subprojects at once</a>.</p></section><section id="autotoc_md4"><h4><a href="#autotoc_md4">Build and run the standalone target</a></h4><p>Use the following command to build and run the executable target.</p><pre class="m-code">cmake -Hstandalone -Bbuild/standalone
|
||||
<p><a name="md_README"></a> <a href="https://github.com/TheLartians/ModernCppStarter/actions"><img class="m-image" src="https://github.com/TheLartians/ModernCppStarter/workflows/MacOS/badge.svg" alt="Image" /></a> <a href="https://github.com/TheLartians/ModernCppStarter/actions"><img class="m-image" src="https://github.com/TheLartians/ModernCppStarter/workflows/Windows/badge.svg" alt="Image" /></a> <a href="https://github.com/TheLartians/ModernCppStarter/actions"><img class="m-image" src="https://github.com/TheLartians/ModernCppStarter/workflows/Ubuntu/badge.svg" alt="Image" /></a> <a href="https://github.com/TheLartians/ModernCppStarter/actions"><img class="m-image" src="https://github.com/TheLartians/ModernCppStarter/workflows/Style/badge.svg" alt="Image" /></a> <a href="https://github.com/TheLartians/ModernCppStarter/actions"><img class="m-image" src="https://github.com/TheLartians/ModernCppStarter/workflows/Install/badge.svg" alt="Image" /></a> <a href="https://codecov.io/gh/TheLartians/ModernCppStarter"><img class="m-image" src="https://codecov.io/gh/TheLartians/ModernCppStarter/branch/master/graph/badge.svg" alt="Image" /></a></p><img class="m-image" src="https://repository-images.githubusercontent.com/254842585/4dfa7580-7ffb-11ea-99d0-46b8fe2f4170" alt="Image" /><section id="autotoc_md0"><h2><a href="#autotoc_md0">ModernCppStarter</a></h2><p>Setting up a new C++ project usually requires a significant amount of preparation and boilerplate code, even more so for modern C++ projects with tests, executables and continuous integration. This template is the result of learnings from many previous projects and should help reduce the work required to setup up a modern C++ project.</p><section id="autotoc_md1"><h3><a href="#autotoc_md1">Features</a></h3><ul><li><a href="https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/">Modern CMake practices</a></li><li>Suited for single header libraries and projects of any scale</li><li>Clean separation of library and executable code</li><li>Integrated test suite</li><li>Continuous integration via <a href="https://help.github.com/en/actions/">GitHub Actions</a></li><li>Code coverage via <a href="https://codecov.io">codecov</a></li><li>Code formatting enforced by <a href="https://clang.llvm.org/docs/ClangFormat.html">clang-format</a> and <a href="https://github.com/cheshirekow/cmake_format">cmake-format</a> via <a href="https://github.com/TheLartians/Format.cmake">Format.cmake</a></li><li>Reproducible dependency management via <a href="https://github.com/TheLartians/CPM.cmake">CPM.cmake</a></li><li>Installable target with automatic versioning information and header generation via <a href="https://github.com/TheLartians/PackageProject.cmake">PackageProject.cmake</a></li><li>Automatic <a href="https://thelartians.github.io/ModernCppStarter">documentation</a> and deployment with <a href="https://www.doxygen.nl">Doxygen</a> and <a href="https://pages.github.com">GitHub Pages</a></li><li>Support for <a href="#additional-tools">sanitizer tools, and more</a></li></ul></section><section id="autotoc_md2"><h3><a href="#autotoc_md2">Usage</a></h3><section id="autotoc_md3"><h4><a href="#autotoc_md3">Adjust the template to your needs</a></h4><ul><li>Use this repo <a href="https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template">as a template</a> and replace all occurrences of "Greeter" in the relevant CMakeLists.txt with the name of your project</li><li>Replace the source files with your own</li><li>For header-only libraries: see the comments in <a href="CMakeLists.txt">CMakeLists.txt</a></li><li>Add <a href="https://docs.codecov.io/docs/quick-start">your project's codecov token</a> to your project's github secrets under <code>CODECOV_TOKEN</code></li><li>Happy coding!</li></ul><p>Eventually, you can remove any unused files, such as the standalone directory or irrelevant github workflows for your project. Feel free to replace the License with one suited for your project.</p><p>To cleanly separate the library and subproject code, the outer <code>CMakeList.txt</code> only defines the library itself while the tests and other subprojects are self-contained in their own directories. During development it is usually convenient to <a href="#build-everything-at-once">build all subprojects at once</a>.</p></section><section id="autotoc_md4"><h4><a href="#autotoc_md4">Build and run the standalone target</a></h4><p>Use the following command to build and run the executable target.</p><pre class="m-code">cmake -Hstandalone -Bbuild/standalone
|
||||
cmake --build build/standalone
|
||||
./build/standalone/Greeter --help</pre></section><section id="autotoc_md5"><h4><a href="#autotoc_md5">Build and run test suite</a></h4><p>Use the following commands from the project's root directory to run the test suite.</p><pre class="m-code">cmake -Htest -Bbuild/test
|
||||
cmake --build build/test
|
||||
|
@ -122,7 +122,7 @@ cmake --build build --target GenerateDocs</pre></section><section id="autotoc_md
|
|||
<div class="m-container">
|
||||
<div class="m-row">
|
||||
<div class="m-col-l-10 m-push-l-1">
|
||||
<p>Greeter. Created with <a href="https://doxygen.org/">Doxygen</a> 1.8.20 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
|
||||
<p>Greeter. Created with <a href="https://doxygen.org/">Doxygen</a> 1.9.1 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue