forgottenserver icon indicating copy to clipboard operation
forgottenserver copied to clipboard

Use Ninja multi-config with CMake

Open ranisalt opened this issue 2 years ago • 0 comments

Pull Request Prelude

Changes Proposed

Issues addressed:

Using Ninja multi-config allows us to build in multiple configurations, such as Debug, RelWithDebInfo and Release.

Currently, one needs to pass the build type prior to generating makefiles, with cmake --preset default -DCMAKE_BUILD_TYPE=<buildtype> followed by cmake --build --preset default, and rebuilding with a different config required regenerating makefiles.

Now, a clearer invocation of cmake is possible with cmake --preset default to generate makefiles, and then cmake --build --preset default --config <buildtype> is possible without regenerating makefiles, and in separate folders so that one can maintain multiple builds (for debugging and running in production, for example)

ranisalt avatar Aug 19 '23 00:08 ranisalt