Work in progress. Milestones will be added to the project soon.
To use this locally on your machine, you will need the following:
- CMake v3.22+
- C++ Compiler with at least C++17 support (any recent compiler)
- (optional) ccache for faster rebuilds
- (optional) clang-format for linting and automatic code formatting (CI uses clang-format version 15)
Here's an example of how to build & install a release version (use the terminal to run the following commands in the parent directory of this repo):
$ cmake -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install
$ cmake --build ./build --parallel
$ cmake --install ./build
$ cmake -B ./build -G"Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install
$ cmake --build ./build --config Release
$ cmake --install ./build
This tells CMake to use Visual Studio 2022
. There is a list of Visual Studio generators on the CMake site - pick the one you are using.
This template defines the following additional CMake options:
Option | Description | Default |
---|---|---|
CCACHE_PROGRAM |
Path to ccache for faster rebuilds |
This is automatically set ON if ccache is found. If you do not want to use it, set this to "". |
CLANG_FORMAT_PROGRAM |
Path to clang-format for code formatting. |
This is automatically set ON if clang-format is on. If you do not want to use it, set this to "". |
${PROJECT_NAME_UPPERCASE}_WARN_EVERYTHING (e.g. FOO_WARN_EVERYTHING) |
Turns on all warnings. (Not available for MSVC.) | OFF (too noisy, but can be useful sometimes) |
${PROJECT_NAME_UPPERCASE}_WARNING_AS_ERROR (e.g. FOO_WARNING_AS_ERROR) |
Turns warnings into errors. | ON |
- GDExtension template for CMake