Skip to content

Linux development

Linux is the broadest local and CI development lane, but a build result is meaningful only with its compiler, frontend, SDL version, localization, sound, tests, sanitizer, and build type.

Authoritative entry points

  • Makefile defines the native Make feature switches and validation targets.
  • CMakePresets.json defines linux-x64, linux-tiles-sounds-x64, and the vcpkg variant.
  • .github/workflows/matrix.yml records the combinations exercised by current CI.
  • doc/c++/COMPILING.md is useful background; when it conflicts with the files above, the build files win.

Supported routes

The smallest CMake route is the curses, localized, test-enabled linux-x64 preset. The linux-tiles-sounds-x64 preset adds the graphics and audio dependency surface. Native Make builds expose the same concerns through TILES, SOUND, SDL3, LOCALIZE, TESTS, compiler, sanitizer, and release flags.

cmake --list-presets
cmake --preset linux-x64
cmake --build --preset linux-x64

For a focused native test route, follow the root AGENTS and test matrix rather than copying a large release command:

make -j2 tests
./tests/cata_test "<focused filter>"

Validation and artifacts

Report distribution, architecture, compiler/version, Make or CMake, preset/flags, curses or tiles, SDL2/SDL3, sound, localization, sanitizer, and the exact test filter. Build directories, compile_commands.json, profiler captures, and symbol databases are local or CI artifacts, not source files to commit.

Boundaries and caveats

Do not infer Windows or Android support from Linux. SDL3 requires compiled shader artifacts; SDL2 is still a distinct fallback lane. Package-manager commands in legacy prose age quickly, so diagnose against configure output and the verified build configuration.