Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMake from source reinstall for CMake versions < 3.20 #291

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
11 changes: 10 additions & 1 deletion src/cpp/.devcontainer/reinstall-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,16 @@ case "${architecture}" in
;;
esac

CMAKE_BINARY_NAME="cmake-${CMAKE_VERSION}-linux-${ARCH}.sh"
# Kitware OS naming:
# CMake version < 3.20, the OS names begin with an uppercase letter
# CMake version >= 3.20, the OS names begin with a lowercase letter
if [[ "${CMAKE_VERSION}" > "3.20" ]]; then
OS_NAME="Linux"
else
OS_NAME="linux"
fi

CMAKE_BINARY_NAME="cmake-${CMAKE_VERSION}-${OS_NAME}-${ARCH}.sh"
CMAKE_CHECKSUM_NAME="cmake-${CMAKE_VERSION}-SHA-256.txt"
TMP_DIR=$(mktemp -d -t cmake-XXXXXXXXXX)

Expand Down