Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

merge back PR 9899, try using oob cmake so as to save building time #9959

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions scripts/eosio_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,19 @@ execute cd $REPO_ROOT
# Submodules need to be up to date
ensure-submodules-up-to-date

# Try using oob cmake if possible so as to save building time
if [[ $ARCH == "Linux" ]]; then
if [[ ${NAME} == "Ubuntu" ]]; then
if [[ -z $(command -v cmake 2>/dev/null) ]] ; then
if [[ ${VERSION_ID} == "18.04" || ${VERSION_ID} == "20.04" ]]; then
install-package cmake
fi
fi
elif [[ ${NAME} == "CentOS Linux" && "$(echo ${VERSION} | sed 's/ .*//g')" == 8 ]] || [[ ${NAME} == "Amazon Linux" ]] ; then
install-package cmake3
fi
fi

# Check if cmake already exists
( [[ -z "${CMAKE}" ]] && [[ ! -z $(command -v cmake 2>/dev/null) ]] ) && export CMAKE=$(command -v cmake 2>/dev/null) && export CMAKE_CURRENT_VERSION=$($CMAKE --version | grep -E "cmake version[[:blank:]]*" | sed 's/.*cmake version //g')
# If it exists, check that it's > required version +
Expand Down