Skip to content

Setting up on macOS Catalina

Alex Reinking edited this page Aug 4, 2020 · 2 revisions

Install dependencies with Homebrew

First, install Homebrew if you haven't already, following the directions at https://brew.sh

This will require you to install Xcode as well as running xcode-select --install to get the AppleClang command line loaded.

Then, run:

$ brew install cmake doxygen ninja llvm libpng libjpeg python@3.8

From the root of the repository, run:

$ pip3 install -r python_bindings/requirements.txt

Build with CMake

The Homebrew LLVM package does not install into a standard path, so CMake will need to be pointed at it. Also note that compiling with GCC on macOS is not supported. From the root of the repository, run:

$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/local/opt/llvm -S . -B build
$ cmake --build build

You can then run tests like so:

$ cd build
$ ctest