Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

"${script_dir}/install-prebuilt-packages.sh"
"${script_dir}/install-packages-from-source.sh"

# TODO: https://github.com/y-scope/clp/issues/795
"${script_dir}/../check-cmake.sh"
18 changes: 18 additions & 0 deletions components/core/tools/scripts/lib_install/check-cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

# Exit on any error
set -e

# Error on undefined variable
set -u

# Get the installed cmake version string
cmake_version=$(cmake --version | head --lines 1 | awk '{print $3}')
cmake_major_version=$(echo "$cmake_version" | cut -d. -f1)

# Check if version is 4.0 or higher
# shellcheck disable=SC2071
if ! [[ "$cmake_version" < "4" ]]; then
echo "CMake version $cmake_version is currently unsupported (>= 4.0)."
exit 1
fi
13 changes: 12 additions & 1 deletion components/core/tools/scripts/lib_install/macos/install-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ set -e
set -u

brew update

# Install CMake v3.31.6 as ANTLR and yaml-cpp do not yet support CMake v4+.
cmake_formula_path=/tmp/cmake.rb
curl --fail --location --show-error \
https://raw.githubusercontent.com/Homebrew/homebrew-core/b4e46db74e74a8c1650b38b1da222284ce1ec5ce/Formula/c/cmake.rb \
--output "${cmake_formula_path}"
brew install --formula "${cmake_formula_path}"

brew install \
boost \
cmake \
coreutils \
fmt \
gcc \
Expand All @@ -32,3 +39,7 @@ brew install \
if ! command -v pkg-config ; then
brew install pkg-config
fi

# TODO: https://github.com/y-scope/clp/issues/795
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
"${script_dir}/../check-cmake.sh"
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ set -u

script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

"$script_dir"/install-prebuilt-packages.sh
"$script_dir"/install-packages-from-source.sh
"${script_dir}/install-prebuilt-packages.sh"
"${script_dir}/install-packages-from-source.sh"

# TODO: https://github.com/y-scope/clp/issues/795
"${script_dir}/../check-cmake.sh"
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ set -u

script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

"$script_dir"/install-prebuilt-packages.sh
"$script_dir"/install-packages-from-source.sh
"${script_dir}/install-prebuilt-packages.sh"
"${script_dir}/install-packages-from-source.sh"

# TODO: https://github.com/y-scope/clp/issues/795
"${script_dir}/../check-cmake.sh"
Loading