Inital commit
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
# AGENTS.md
|
||||
|
||||
## Project Overview
|
||||
|
||||
`cuber` is a simple cube timer application.
|
||||
|
||||
## Build System
|
||||
|
||||
- **Generator:** Ninja
|
||||
- **CMake minimum:** 3.21
|
||||
- **C++ standard:** C++23
|
||||
|
||||
### Commands
|
||||
|
||||
```bash
|
||||
cmake -S . -B build -GNinja
|
||||
ninja -C build
|
||||
./build/cuber.exe
|
||||
```
|
||||
|
||||
### Dependencies
|
||||
|
||||
Dependencies are managed via custom `Find*.cmake` scripts in `deps/`.
|
||||
These scripts use `FetchContent` under the hood to download and build
|
||||
libraries automatically. They are shared with the `nerv` project.
|
||||
|
||||
To add a new dependency:
|
||||
|
||||
1. Copy the corresponding `Find<name>.cmake` from `nerv/deps/`
|
||||
2. Add `find_package(<name> REQUIRED)` to `CMakeLists.txt`
|
||||
3. Link with `<name>::<name>` in `target_link_libraries()`
|
||||
|
||||
### CMake Module Path
|
||||
|
||||
`deps/` is added to `CMAKE_MODULE_PATH` so `find_package()` resolves
|
||||
to the custom scripts instead of system-installed packages.
|
||||
|
||||
## Coding Conventions
|
||||
|
||||
- **Language:** C++23
|
||||
- **Trailing return type** for function signatures
|
||||
- **4-space indentation**
|
||||
- **No semicolons after closing braces** for namespaces/classes
|
||||
- `auto` for obvious types (e.g. `auto main(...) -> int`)
|
||||
|
||||
## Source Layout
|
||||
|
||||
```
|
||||
cuber/
|
||||
CMakeLists.txt # Build configuration
|
||||
cuber.cpp # Entry point
|
||||
deps/ # Custom Find*.cmake scripts
|
||||
Findfmt.cmake # fmt library
|
||||
```
|
||||
|
||||
## Platform Support
|
||||
|
||||
The `nerv` project supports Windows, Linux, Emscripten, and Android via
|
||||
`Platform.cmake` and `Flags.cmake`. These can be added to `cuber/deps/`
|
||||
when cross-platform support is needed.
|
||||
|
||||
Reference in New Issue
Block a user