Skip to content

CMake Library Update

Toolchains Supported

The build.py script supports several toolchains, each intended for specific host environments:

  • gnu - The native GNU compiler on Linux, targeting Linux x86_64.
  • ga - The GNU compiler on Linux, cross-compiling for the ARM (aarch64) architecture.
  • gw - The GNU cross-compiler toolchain running on Linux, targeting Windows (mingw-w64).
  • mingw - The MinGW compiler, running natively on Windows or within Wine, targeting Windows.
  • msvc - The Microsoft Visual C++ compiler, running natively on Windows or within Wine, targeting Windows.
Toolchain Linux Wine Docker(Wine) Windows
gnu 🛠🚀 ➖ 🛠🚀 ➖
ga 🛠🚀 ➖ 🛠🚀 ➖
gw 🛠 🚀 🛠🚀 ➖
mingw ➖ 🛠🚀 🛠🚀 🛠🚀
msvc ➖ 🛠🚀 🛠🚀 🛠🚀

🛠 Build/Compile projects.
🚀 Execution of tests and applications.

The table below shows how to invoke build.py for a given toolchain <tc> in each supported environment:

Environment Command to Make and Build
Linux ./build.py -mb <tc>-debug
Linux + Wine ./build.py wine -- -mb <tc>-debug
Docker ./build.py docker -- -mb <tc>-debug
Docker + Wine ./build.py docker -- wine -- -mb <tc>-debug
Native Windows build.py -mb <tc>-debug
usage: build.py native [-h] [-d] [-i] [-c] [-f] [-D] [-F] [-C] [-l] [-m] [-b] [-B] [-t] [-T] [-R <regex>] [-p] [-w] [-n <trg>] [-N] [--no-fancy] [preset]

positional arguments:
  preset                Single preset to process and when omitted a dialog is shown to select one.

options:
  -h, --help            Shows the command's help.
  -d, --dry-run         Show executed commands without executing them.
  -i, --info            Return information on presets.
  -c, --clean           Remove the built artifacts first (cmake option '--clean-first').
  -f, --fresh           Optional flag for adding (cmake option --fresh).
  -D, --debug           Optional flag for adding (cmake option --debug-output).
  -F, --fresh-all       Clears the build tree of all 'CMakeCache.txt' files.
  -C, --wipe            Wipe build directory contents.
  -l, --list-only       Lists tests only.
  -m, --make            Create build directory/makefiles only.
  -b, --build           Build target(s) and make config when it does not exist.
  -B, --build-only      Build target(s) only and fail when the configuration does not exist.
  -t, --test            Runs ctest using a test-preset.
  -T, --test-select     Runs ctest using a dialog selecting a test.
  -R <regex>, --test-regex <regex>
                        Regular expression on which test names are to be executed.
  -p, --package         Create packages.
  -w, --workflow        Runs workflow presets.
  -n <trg>, --target <trg>
                        Overrides the build targets set in the preset by a single target.
  -N, --target-select   Selects a single target single target to build.
  --no-fancy            Disables the fancy menu/dialog for selections.