You can inherit from a hidden base, then from another preset, and finally override specific variables. Condition on build type "condition": "type": "equals", "lhs": "$envCI", "rhs": "true"

Managing CMake configurations across different environments (debug, release, Windows, Linux, macOS, CI/CD) can quickly become messy. Command-line variables and toolchain files are powerful, but they’re hard to share and standardize.

1. Version and Minimum CMake Version "version": 6, "cmakeMinimumRequired": "major": 3, "minor": 23, "patch": 0

Enter CMakePresets.json – a game-changing feature introduced in CMake 3.19 and continuously improved since. It allows you to define, version-control, and share build configurations in a single JSON file.