Repository navigation
Compiling FastNoise2
Download FastNoise2 source either by cloning the git repo or downloading the code zip on GitHub.
Precompiled binaries can be downloaded from Releases if you don't want to set up CMake compiling yourself.
FastNoise2 uses CMake for project setup. Install CMake for your platform:
Download from https://cmake.org/download/ and install.
sudo apt install cmake
brew install cmake
Open a terminal in the root of the FastNoise2 source (where the LICENSE file is located).
Generate project files with the default settings:
cmake -S . -B build
You can configure which parts of FastNoise2 are built using -D:
cmake -S . -B build -D FASTNOISE2_TOOLS=ON -D FASTNOISE2_TESTS=OFF
| Option | Default | Description |
|---|---|---|
FASTNOISE2_TOOLS |
ON (standalone) | Build the Node Editor application |
FASTNOISE2_TESTS |
OFF | Build benchmark/test executables |
FASTNOISE2_UTILITY |
OFF | Build utility tools (e.g. WikiGenerator) |
FASTNOISE2_STRICT_FP |
OFF | Enable strict floating point for cross-machine reproducibility |
BUILD_SHARED_LIBS |
OFF | Build as a shared library (DLL) instead of static |
On Windows, using ClangCL instead of MSVC is strongly recommended:
- MSVC has known SIMD compiler bugs that can cause incorrect noise generation
- ClangCL compiles significantly faster
- ClangCL produces measurably faster runtime performance
- ClangCL binaries are fully compatible with MSVC (same ABI)
To use ClangCL, install the "C++ Clang Compiler for Windows" component in the Visual Studio Installer, then configure with:
cmake -S . -B build -T ClangCL
Using the same terminal as above:
cmake --build build --config Release
Replace Release with Debug for a debug build.
After building, see Including the library in your project for how to link FastNoise2 into your own application.