Skip to content

Latest commit

 

History

History
74 lines (48 loc) · 1.71 KB

building.md

File metadata and controls

74 lines (48 loc) · 1.71 KB

Building nyan

This project requires a C++26 compiler (g++ >= 16, clang++ >= 21 or Visual Studio 2022 >= 17.4) and uses flex, cmake and ninja.

You can use the justfile to launch common build steps.

Dependencies

Ubuntu 26.04 or later
sudo apt-get update
sudo apt-get install cmake flex ninja-build

For gcc: sudo apt-get install gcc g++

For clang: sudo apt-get install clang

Archlinux
sudo pacman -Syu --needed cmake flex ninja clang gcc
Gentoo
sudo emerge -avt cmake flex ninja
Windows

Clone this repository

git clone https://github.com/SFTtech/nyan.git

Build

The common build steps are driven by the justfile:

cd nyan
just build   # configure with ninja and build
just test    # run tests

which boils down to the standard cmake project dance:

cd nyan
cmake -B build -G Ninja
cmake --build build

Note: if nyan can't find flex add -DFLEX_EXECUTABLE=path/to/win_flex.exe to the cmake configure command.

cmake registers the project in the user package registry. Other projects can therefore easily find nyan without installing it (no sudo make install needed).

find_package(nyan CONFIG REQUIRED) will directly provide nyan::nyan as a target to link to (with its include directories etc).