Building quick-lint-js on Linux from source
On Linux, you can build quick-lint-js using one of the following build systems:
- CMake & Ninja (recommended)
- Nix (Nix users only)
- Single-command build (not recommended)
Build with CMake & Ninja
0. Install build dependencies
Before building quick-lint-js, install the following third-party dependencies:
For Debian, Ubuntu, and Linux Mint, run the following command to install all necessary dependencies:
sudo apt-get update && sudo apt-get install cmake g++ ninja-build
For Fedora, run the following command to install all necessary dependencies:
sudo dnf install cmake gcc-c++ ninja-build
For Arch Linux, run the following command to install all necessary dependencies:
sudo pacman -Syy cmake gcc ninja
1. Configure with CMake
Run the following command to create a directory called
build
:
mkdir build ; cd build ; cmake -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Debug .. ; cd "$OLDPWD"
2. Build
Run the following command to build the quick-lint-js executable, quick-lint-js’ tests, and quick-lint-js’ benchmarks:
ninja -C build
If you only want to build the quick-lint-js executable:
ninja -C build quick-lint-js
If you only want to build quick-lint-js’ tests:
ninja -C build quick-lint-js-test
3. Run
Run the following command to run quick-lint-js’ test suite:
./build/test/quick-lint-js-test
If you want to run the quick-lint-js program:
./build/quick-lint-js --help