![]() Headers under /src will not be included in distributable packages. Private headers (those that should not be used by dependent code outside the project) belong in the same directory as the source files which use them, under /src.This entire directory will be included in distributable packages. Public headers (those intended to be consumed by users of the package) belong in the /include directory (relative to the project’s root).The folder structure is reasonably self-explanatory, but a common point of confusion is where to place headers: Windows and Mac package formats can be added easily enough with other CPack generators. It builds distributable packages in ZIP, DEB, and RPM formats.It contains an init script, intended for auto-starting the above-mentioned executable in Linux environments.It contains a C++ executable, utilizing the above library.It contains a C++ library for consumers of the package.(Enough feedback may prompt a revival of Learn CMake.)Ī few key points about the project are worth pointing out before continuing on: Understanding how to configure CMake and CPack as shown in the first commit requires prerequisite knowledge of the CMake build system and is therefore beyond the scope of this article, but specific questions are always welcome in the comments. The project starts out with all of the basic CMake logic and C++ code organized into sensible directories. You are free to do anything you wish with it, no attribution necessary (just don’t sue me). The JumpstartedSkeleton project is released to the public domain under the Zero-Clause BSD license. Understanding the contents of this article will provide a deeper understanding into how projects work when generated in this fashion. The JumpstartedSkeleton project was generated by the jumpstart Docker image – an interactive program that tailors its output to your needs. Add a Make target to build Doxygen documentation.Add a Conan recipe file and adjust CMake to utilize it when possible.Add support for generating an appropriate SonarQube properties file.Add custom CMake targets for executing clang-tidy and Cppcheck.Add support for generating code coverage reports with gcov.Add logic to CMake to optionally run the tests through valgrind.Add unit test support with Google Test (both GTest and GMock).As the git log explains, there are eight basic steps: Each step of this process is recorded as a commit in Git at. We’ll walk through creating a skeleton C++ project from the ground up and incorporate each tool, one-by-one. Today I’m going to begin showing you how these tools fit together in the complex puzzle that is a C++ development environment. ![]() ![]() In Part 1 of this series, I gave a quick overview of each tool in the development environment and how I came to the conclusion that the tool was a good fit. ![]()
0 Comments
Leave a Reply. |