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-version.sh"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/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 -E capabilities | jq --raw-output ".version.string")
cmake_major_version=$(cmake -E capabilities | jq --raw-output ".version.major")

# Check if version is 4.0 or higher
if [[ "$cmake_major_version" -ge "4" ]]; then
echo "CMake version $cmake_version is currently unsupported (>= 4.0)."
exit 1
fi
14 changes: 13 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,17 @@ set -e
set -u

brew update

# Install CMake v3.31.6 as ANTLR and yaml-cpp do not yet support CMake v4+.
# See also: https://github.com/y-scope/clp/issues/795
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 +40,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-version.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-version.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-version.sh"
Loading