Skip to content

Commit

Permalink
Add support for sudo in setup scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
majetideepak committed Mar 5, 2024
1 parent ccb464b commit ed6284c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/setup-helper-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ function cmake_install {
mkdir -p "${BINARY_DIR}"
CPU_TARGET="${CPU_TARGET:-unknown}"
COMPILER_FLAGS=$(get_cxx_flags $CPU_TARGET)
SUDO="${SUDO:-""}"

# CMAKE_POSITION_INDEPENDENT_CODE is required so that Velox can be built into dynamic libraries \
cmake -Wno-dev -B"${BINARY_DIR}" \
Expand All @@ -169,6 +170,6 @@ function cmake_install {
-DCMAKE_CXX_FLAGS="$COMPILER_FLAGS" \
-DBUILD_TESTING=OFF \
"$@"
ninja -C "${BINARY_DIR}" install
${SUDO} ninja -C "${BINARY_DIR}" install
}

1 change: 1 addition & 0 deletions scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ BOOST_VERSION=boost-1.84.0
NPROC=$(getconf _NPROCESSORS_ONLN)
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)}
export CMAKE_BUILD_TYPE=Release
SUDO=sudo

# Install all velox and folly dependencies.
# The is an issue on 22.04 where a version conflict prevents glog install,
Expand Down

0 comments on commit ed6284c

Please sign in to comment.