https://github.com/ed-2100/c-cpp-monorepo
A monorepo for all of my desktop C/C++ projects.
https://github.com/ed-2100/c-cpp-monorepo
c cmake cpp cpp23 demo-project graphics
Last synced: 3 months ago
JSON representation
A monorepo for all of my desktop C/C++ projects.
- Host: GitHub
- URL: https://github.com/ed-2100/c-cpp-monorepo
- Owner: ed-2100
- Created: 2025-02-10T16:35:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-18T19:28:14.000Z (over 1 year ago)
- Last Synced: 2025-08-03T06:37:56.136Z (12 months ago)
- Topics: c, cmake, cpp, cpp23, demo-project, graphics
- Language: C++
- Homepage:
- Size: 661 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# C/C++ Projects Monorepo
A monorepo for all of my desktop C/C++ projects.
## Projects
- [`cleanup_stack`](cleanup_stack/README.md)
- [`game_of_life`](game_of_life/README.md)
- [`glowing_dots`](glowing_dots/README.md)
- [`tictactoe`](tictactoe/README.md)
- [`vk_test`](vk_test/README.md)
## Dependencies
The Vulkan SDK and SDL3 is required to build this project.
## Building
To build on Linux:
```sh
cmake -B builddir
make -C builddir
```
## Other Development Commands
- **Formatting** \
Requires `clang-format` and `fd-find`.
```sh
clang-format -i $(fd --glob '*.{cpp,hpp,c,h}' --exclude ./builddir/ --type file ./)
```
- **Retrieving the Line Count** \
Requires `fd-find` from crates.io.
```sh
wc -l $(fd --glob '*' --exclude ./builddir/ --type file ./)
```
- **Leak Checking** \
Requires `valgrind`.
```sh
valgrind --tool=memcheck --leak-check=full --show-leak-kinds=definite,possible ./builddir/my_exe/my_exe
```
- **Static Analysis** \
Requires `clang-analyzer`.
```sh
scan-build cmake -B builddir
scan-build make -C builddir -j $(($(nproc) - 2)
```
## Notes on Toolchain
- [This](https://github.com/mesonbuild/meson/issues/10590) is my reasoning for not using meson.
- To use clang explicitly, add `--toolchain clang_compile.cmake` to your cmake command.
- To use wayland explicitly with SDL programs, prepend `env SDL_VIDEODRIVER=wayland` to your shell command.