mines
Loading...
Searching...
No Matches
Build instructions

Guide

Linux

Instructions tested on:

  • Debian 13
  • Debian Unstable

They can be adapted for other distributions as well.

Install the following dependencies:

  • clang 19.1.7+ (GCC 14.2.0+ can also be used, but you'll need to adapt the instructions)
  • CMake 3.28+
  • Ninja
  • GoogleTest (optional, used for unit tests)
  • Doxygen 1.13.2+ (optional, used for documentation)

To install them on:

  • Debian Unstable

    To install all dependencies, run the following command:

    sudo apt install clang cmake ninja googletest doxygen

    To instead install only required dependencies, run the following command:

    sudo apt install clang cmake ninja
  • Debian 13

    To install all dependencies, run the following command:

    sudo apt install clang cmake ninja googletest

    The version of Doxygen in Debian 13 is older than the recommended one, so it's best to download a build from https://www.doxygen.nl/download.html.

    The bin directory of Doxygen must be placed on the PATH, to do so temporarily (for the current shell), run the following command (replace /path/to/doxygen with the path to the Doxygen install directory):

    PATH="/path/to/doxygen/bin:$PATH"

    To instead install only required dependencies, run the following command:

    sudo apt install clang cmake ninja

Configure the project by running the following command:

cmake -B build -GNinja -DCMAKE_CXX_COMPILER=clang++

Finally, build the project by running the following command:

cmake --build build

This will produce the executable build/mines, as well as documentation build/html, if Doxygen was configured.

macOS

Install the following dependencies:

  • clang 19.1.7+ (GCC 14.2.0+ can also be used, but you'll need to adapt the instructions)
  • CMake 3.28+
  • Ninja
  • GoogleTest (optional, used for unit tests)
  • Doxygen 1.13.2+ (optional, used for documentation)

To install all dependencies using brew, run the following command:

brew install llvm cmake ninja googletest doxygen

To instead install only required dependencies, run:

brew install llvm cmake ninja

Configure the project by running the following command:

cmake -B build -GNinja -DCMAKE_CXX_COMPILER=clang++

Finally, build the project by running the following command:

cmake --build build

This will produce the executable build/mines, as well as documentation build/html, if Doxygen was configured.

Windows

Install the following dependencies:

In the project directory, run:

cmake -B build

Then, open the solution build\mines.sln in Visual Studio and build the project there. It will produce an executable in it's usual location.

Alternatively, to build from the command line, run:

cmake --build build

This will produce the executable build\mines.exe, as well as documentation build\html, if Doxygen was configured.

General instructions

Dependencies

  • C++ compiler with C++23 support

    Minimal tested compiler versions:

    • clang 19.1.7
    • GCC 14.2.0
    • Visual Studio 2022
  • CMake 3.28+

    Minimal tested version: 3.31.6

    Only Ninja and Visual Studio generators are currently supported.

  • Ninja, if using the Ninja generator in CMake

    Minimal tested version: 1.12.1

  • GoogleTest (optional, used for unit tests)

    Minimal tested version: 1.17.0

  • Doxygen 1.13.2+ (optional, used for documentation)

    Older Doxygen versions should also work, but will not generate module-oriented documentation.

    Minimal tested version: 1.15.0

Setup

The project is built with CMake. Example commands for unix platforms:

cmake -B build -GNinja
cmake --build build