Skip to content

Commit 29ea23e

Browse files
committed
build: add minimal developer setup doc
1 parent 629a2e6 commit 29ea23e

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

docs/dev-setup.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Developer Setup
2+
3+
This note is for contributors working in a fresh local environment. It keeps the setup small and mirrors the repository's existing CMake and CTest flow.
4+
5+
## Required Tools
6+
7+
- CMake 3.21 or newer for the shared presets in `CMakePresets.json`
8+
- CMake 3.20 or newer for the manual fallback flow
9+
- A C++20 compiler
10+
- Windows: Visual Studio 2022 or Build Tools 2022 with the MSVC v143 toolset
11+
- Linux: `g++` 10+ or `clang++` 14+ plus `make` or `ninja`
12+
- Git for normal contribution flow
13+
14+
## Quick Start With Presets
15+
16+
`CMakePresets.json` includes two repeatable local entry points:
17+
18+
- `dev-debug`: default local iteration build with tests enabled
19+
- `ci-release`: release build intended to mirror the GitHub Actions CI flags
20+
21+
Local debug iteration:
22+
23+
```bash
24+
cmake --preset dev-debug
25+
cmake --build --preset dev-debug
26+
ctest --preset dev-debug
27+
```
28+
29+
Local CI-style validation:
30+
31+
```bash
32+
cmake --preset ci-release
33+
cmake --build --preset ci-release
34+
ctest --preset ci-release
35+
```
36+
37+
## Manual Fallback
38+
39+
If you do not want to use presets, or if your local CMake is 3.20 but not 3.21+, the equivalent manual flow is:
40+
41+
```bash
42+
cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -D BUILD_TESTING=ON
43+
cmake --build build
44+
ctest --test-dir build --output-on-failure
45+
```
46+
47+
## Windows Notes
48+
49+
- Run from a Developer PowerShell for Visual Studio 2022, an x64 Native Tools prompt, or another shell where the MSVC toolchain is already available.
50+
- If `cmake` is missing from `PATH`, install either the Visual Studio C++ workload with CMake support or a standalone Kitware CMake package, then reopen the shell.
51+
- Visual Studio generators are multi-config, so the presets set `Debug` or `Release` again at build and test time for consistency.
52+
53+
## Linux Notes
54+
55+
- A small Ubuntu/Debian-style setup is usually enough:
56+
57+
```bash
58+
sudo apt install cmake g++ make
59+
```
60+
61+
- If you prefer Clang, configure manually with `-D CMAKE_CXX_COMPILER=clang++` or create a local user preset.
62+
63+
## Expected Local Outputs
64+
65+
- Build directories under `build/dev-debug` or `build/ci-release`
66+
- Test runs for `parser`, `detector`, and `cli`
67+
- `compile_commands.json` in the debug build directory when the selected generator supports it

0 commit comments

Comments
 (0)