# CMake Error: Could not create named generator 'Ninja' because the generator requires CMake >= 3.20 but you are running version 3.18.4

- **ID:** `cmake/ninja-requires-cmake-3-20`
- **Domain:** cmake
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 88%

## Root Cause

The Ninja generator (or a specific Ninja version) requires a newer CMake, but an older CMake is installed.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| CMake 3.18.4 | active | — | — |
| CMake 3.20.0 | active | — | — |
| Ninja 1.11.0 | active | — | — |

## Workarounds

1. **Upgrade CMake to version 3.20 or later. On Ubuntu: sudo apt install cmake=3.20.0-* or download from cmake.org.** (90% success)
   ```
   Upgrade CMake to version 3.20 or later. On Ubuntu: sudo apt install cmake=3.20.0-* or download from cmake.org.
   ```
2. **Use an alternative generator like 'Unix Makefiles' if Ninja is not strictly needed: cmake -G "Unix Makefiles" ..** (80% success)
   ```
   Use an alternative generator like 'Unix Makefiles' if Ninja is not strictly needed: cmake -G "Unix Makefiles" ..
   ```

## Dead Ends

- **** — CMake explicitly checks version requirements and refuses to use incompatible generators. (85% fail)
- **** — The version requirement is intrinsic to the generator's features, not Ninja itself; downgrading Ninja may break other builds. (65% fail)
