-
Notifications
You must be signed in to change notification settings - Fork 6
Development: Building
The recommended way to build is with Meson. However, we do also support CMake (see below).
Assuming you are in the top-level directory, run the following commands to build and install locally:
$ cd mbuild
$ meson compile
...
$ sudo meson install
Every once in a while, you may see the following error when running meson compile
:
ninja: build stopped: Error writing to build log: Permission denied.
The fix is simple:
rm .ninja_*
Then run the meson compile
command again.
CMake generates a Makefile (created in the build
directory by the configure
script), so you normally use make to invoke the build:
$ cd build
$ make
...
$ sudo make install
However, on Windows, we still have some glitches to iron out, so you need to call CMake directly:
$ cd build
$ cmake --build .
...
$ cmake --build . --target install
In all cases, the build is largely controlled by two files:
You can find out what other things you can build by running
$ make help
There are a few automated tests you can run with $ make test
(or cmake --build . --target test
on Windows).
See Automated Tests for more details.
You can build the source code documentation using Doxygen with the following command:
$ make source_doc
...
You can then open brewken/build/doc/html/index.html
in a web browser.
The settings for Doxygen are in brewken/doc/Doxyfile.in