Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
majetideepak committed Sep 13, 2024
1 parent 8c5627b commit 9ee3202
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,19 @@ dependencies for a given platform.
The following setup scripts use the `DEPENDENCY_DIR` environment variable to set the
location to download and build packages. This defaults to `deps-download` in the current
working directory.

Use `INSTALL_PREFIX` to set the install directory of the packages. This defaults to
`deps-install` in the current working directory on macOS and to the default install
location (eg. `/usr/local`) on linux.
Using the default install location `/usr/local` on macOS is discouraged since this
location is used by certain Homebrew versions.

You will have to manually add the `INSTALL_PREFIX` value in the IDE or bash environment,
Manually add the `INSTALL_PREFIX` value in the IDE or bash environment,
say `export INSTALL_PREFIX=/Users/$USERNAME/velox/deps-install` to `~/.zshrc` so that
Velox builds can use the installed packages.
You can also reuse this install for Velox clients such as Prestissimo by specifying a
common location.
subsequent Velox builds can use the installed packages.

*You can reuse `DEPENDENCY_INSTALL` and `INSTALL_PREFIX` for Velox clients such as Prestissimo
by specifying a common shared directory.`*

### Setting up on macOS

Expand Down
14 changes: 8 additions & 6 deletions scripts/setup-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ function install_build_prerequisites {
python3 -m venv ${PYTHON_VENV}
fi
source ${PYTHON_VENV}/bin/activate; pip3 install cmake-format regex pyyaml
curl -L https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-darwin.tar.gz > ccache.tar.gz
tar -xf ccache.tar.gz
mv ccache-4.10.2-darwin/ccache /usr/local/bin/
rm -rf ccache-4.10.2-darwin ccache.tar.gz
if [ ! -f /usr/local/bin/ccache ]; then
curl -L https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-darwin.tar.gz > ccache.tar.gz
tar -xf ccache.tar.gz
mv ccache-4.10.2-darwin/ccache /usr/local/bin/
rm -rf ccache-4.10.2-darwin ccache.tar.gz
fi
}

function install_velox_deps_from_brew {
Expand Down Expand Up @@ -173,5 +175,5 @@ function install_velox_deps {
fi
)

echo 'To add cmake-format bin to your $PATH, consider adding this to your ~/.profile:'
echo 'Please add $INSTALL_PREFIX to your ~/.zshrc'
echo "To reuse the installed dependencies for subsequent builds, consider adding this to your ~/.zshrc"
echo "export INSTALL_PREFIX=$INSTALL_PREFIX"

0 comments on commit 9ee3202

Please sign in to comment.