Skip to content

Compiling on MacOS

José Ángel Soler Ortiz edited this page Oct 5, 2023 · 6 revisions

MacOS prerequisites: xcode-select --install

Get build dependencies:

  • brew install cmake ninja autoconf automake libtool pkg-config
(todds) localadmin@TSTAGG-D todds % python tools/get_ispc.py
Getting latest release of ispc...
Latest release: v1.21.0

Darwin/MacOS system detected with a 64bit i386 CPU...
Downloading and extracting ISPC release from: https://github.com/ispc/ispc/releases/download/v1.21.0/ispc-v1.21.0-macOS.x86_64.tar.gz

Apple i386:

export PATH=$PATH:$(realpath ./ispc/bin/)
rm -rf build && mkdir build && cd build && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./ -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-osx-release .. && cmake --build . --target install

Apple Silicon:

brew install cmake ninja autoconf automake libtool pkg-config
cd [Git root]
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./ -DCMAKE_TOOLCHAIN_FILE=../submodules/vcpkg/scripts/buildsystems/vcpkg.cmake -DTODDS_ISPC=off -DTODDS_REGULAR_EXPRESSIONS=off -DVCPKG_TARGET_TRIPLET=arm64-osx ..
cmake --build . --target install
Clone this wiki locally