File tree Expand file tree Collapse file tree 5 files changed +43
-5
lines changed
components/core/tools/scripts/lib_install Expand file tree Collapse file tree 5 files changed +43
-5
lines changed Original file line number Diff line number Diff line change @@ -10,3 +10,6 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
1010
1111" ${script_dir} /install-prebuilt-packages.sh"
1212" ${script_dir} /install-packages-from-source.sh"
13+
14+ # TODO: https://github.com/y-scope/clp/issues/795
15+ " ${script_dir} /../check-cmake-version.sh"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Exit on any error
4+ set -e
5+
6+ # Error on undefined variable
7+ set -u
8+
9+ # Get the installed cmake version string
10+ cmake_version=$( cmake -E capabilities | jq --raw-output " .version.string" )
11+ cmake_major_version=$( cmake -E capabilities | jq --raw-output " .version.major" )
12+
13+ # Check if version is 4.0 or higher
14+ if [[ " $cmake_major_version " -ge " 4" ]]; then
15+ echo " CMake version $cmake_version is currently unsupported (>= 4.0)."
16+ exit 1
17+ fi
Original file line number Diff line number Diff line change 77set -u
88
99brew update
10+
11+ # Install CMake v3.31.6 as ANTLR and yaml-cpp do not yet support CMake v4+.
12+ # See also: https://github.com/y-scope/clp/issues/795
13+ cmake_formula_path=/tmp/cmake.rb
14+ curl --fail --location --show-error \
15+ https://raw.githubusercontent.com/Homebrew/homebrew-core/b4e46db74e74a8c1650b38b1da222284ce1ec5ce/Formula/c/cmake.rb \
16+ --output " ${cmake_formula_path} "
17+ brew install --formula " ${cmake_formula_path} "
18+
1019brew install \
1120 boost \
12- cmake \
1321 coreutils \
1422 fmt \
1523 gcc \
@@ -32,3 +40,7 @@ brew install \
3240if ! command -v pkg-config ; then
3341 brew install pkg-config
3442fi
43+
44+ # TODO: https://github.com/y-scope/clp/issues/795
45+ script_dir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd ) "
46+ " ${script_dir} /../check-cmake-version.sh"
Original file line number Diff line number Diff line change 88
99script_dir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd ) "
1010
11- " $script_dir " /install-prebuilt-packages.sh
12- " $script_dir " /install-packages-from-source.sh
11+ " ${script_dir} /install-prebuilt-packages.sh"
12+ " ${script_dir} /install-packages-from-source.sh"
13+
14+ # TODO: https://github.com/y-scope/clp/issues/795
15+ " ${script_dir} /../check-cmake-version.sh"
Original file line number Diff line number Diff line change 88
99script_dir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd ) "
1010
11- " $script_dir " /install-prebuilt-packages.sh
12- " $script_dir " /install-packages-from-source.sh
11+ " ${script_dir} /install-prebuilt-packages.sh"
12+ " ${script_dir} /install-packages-from-source.sh"
13+
14+ # TODO: https://github.com/y-scope/clp/issues/795
15+ " ${script_dir} /../check-cmake-version.sh"
You can’t perform that action at this time.
0 commit comments