Building CCB¶
Current Makefile, CMake, Gradle, and CI definitions are authoritative for build behaviour. This page explains entry points and choices. Recheck the owning file before copying a command because dependencies and feature flags can evolve.
Choose a build system¶
| Scenario | Preferred entry | Scope |
|---|---|---|
| Fast Linux development | make |
Shares entry points with formatting, JSON, and tests |
| Cross-platform, IDE, or clangd | CMake preset | Use cmake --list-presets to inspect current presets |
| Windows MSYS2 | Maintained Windows CMake preset or MSYS2 flow | Validate in that shell; Linux results do not prove Windows |
| MSVC | vcpkg/MSVC instructions and CI | Compiler, dependency, and warning differences require MSVC evidence |
| Android | android/gradlew |
Requires SDK/NDK; signing and release credentials stay outside Git |
For this documentation review, the following command was actually run on Linux
at source commit 2c899a3db790e11a6ff44d91f319064b1ee65d2a:
It listed linux-x64, Linux tiles/sounds variants, and Windows MSYS2 presets.
That verifies preset discovery only; it does not claim a completed compile.
Common entry points¶
# validation: cpp-format
make astyle-check
# validation: cpp-tests
make -j2 tests
./tests/cata_test "<focused filter>"
# validation: json-load
make -j2 json-check
# validation: cmake-configure
cmake --preset linux-x64
From android/:
These are authoritative entry-point examples, not results from this docs build. Record the platform, dependency set, result, and every skipped check. This site does not substitute for real Windows, MSVC, or Android validation.
Configuration boundaries¶
CATA_ENABLE_LUA_PLATFORMis enabled by default in CCB Make, CMake, and Android configuration.- Android uses SDL3. Desktop generally uses SDL2; desktop SDL3 CI is gated by
CCB_DESKTOP_SDL3_ENABLED. Do not infer one platform from another. - Tiles, sound, localization, and Lua affect dependencies or artifacts. State the exact combination in the pull request.
- CMake builds must be out-of-tree. Large indexes, Doxygen HTML, ctags, and compilation databases are local or CI artifacts, not committed files.
Diagnose a build failure¶
- Preserve the complete command, first failed target, and compiler or Gradle version.
- Classify the failure as configuration, dependency/download, compile, link, resource copy, or test.
- Compare the same platform and feature combination with CI, not only the last error line.
- Clean only an explicitly identified build directory; never delete a worktree or untracked user data.
- Rerun the failed target, then validate the affected subsystem.
See the platform matrix and validation quickstart for narrower routing.