Mac support is still experimental. Submit bugs if you experience issues.
-
Run terminal.
-
Install homebrew (if haven't already) following instructions from here:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile\n -
Install clang-15 compiler (make sure that the version is not older than 15):
brew install llvm export PATH="/opt/homebrew/opt/llvm/bin:$PATH" export CC=clang export CXX=clang++Consider making environment changes permanent:
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc echo 'export CC=clang' >> ~/.zshrc echo 'export CXX=clang++' >> ~/.zshrc -
Build release version of google benchmark library. It doesn't matter which compiler you use to build it. Install google benchmark library with:
git clone https://github.com/google/benchmark.git cd benchmark git clone https://github.com/google/googletest.git mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. cmake --config Release --target install -
Go to any lab and check if local lab builds are working. You can find the CMake commands here.
-
(Optional) Install ninja.
$ brew install ninjaYou can use it to build labs by passing
-G Ninjato the CMake invocation.