-
Couldn't load subscription status.
- Fork 0
00 Setup
Karn Kaul edited this page Oct 1, 2022
·
1 revision
This project uses CMake 3.18+, C++20, and tries to be agnostic to development environments, without going too overboard. To that end, it uses some configuration files in the root directory:
-
.clang-format: Consistent formatting - requiresclangdor built-in IDE integration, or running.clang-formatmanually over CLI -
.editorconfig: Consistent file encodings, grouped by filename/extension patterns - requiresEditor Configplugin/extension or built-in IDE integration -
CMakePresets.json: Pre-configured presets for Ninja and Visual Studio; users can add more viaCMakeUserPresets.json
The root directory is intended to be kept lean, with only the required files / directories there:
.clang-format ]
.editorconfig ] configuration files
.gitignore ]
CMakeLists.txt ] root CMake script
CMakePresets.json ] CMake presets
tray/ ] parent for all source code (and related scripts)
The root CMake script sets up the project, global CMake flags, options if any, and delegates the target defintions to a sub-script in tray/.
Inside tray/ we set up the project, for now with just a contrived main file and a CMake script that adds it to an executable target:
tray/
src/ ] parent for C++ sources
main.cpp
CMakeLists.txt ] main project script