| IntroductionRequirement | Codemap | Build | CI | Appendices | License |
This is an example of how to create a Modern CMake C++ Project.
This project should run on GNU/Linux, MacOS and Windows.
Requirement
You'll need:
- "CMake >= 3.16".
Codemap
The project layout is as follow:
-
CMakeLists.txt Top-level for CMake based build.
-
cmake Subsidiary CMake files.
-
ci Root directory for continuous integration.
-
Foo Root directory for
Foo
library.- CMakeLists.txt for
Foo
. - include public folder.
- src private folder.
- CMakeLists.txt for
Build
To build the C++ project, as usual:
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
Misc
Image has been generated using plantuml:
plantuml -Tsvg docs/{file}.dot
So you can find the dot source files in ci/docs.
License
Apache 2. See the LICENSE file for details.
Disclaimer
This is not an official Google product, it is just code that happens to be owned by Google.