Skip to content

Commit

Permalink
Kitware's cmake is not available for non-LTS Ubuntu versions
Browse files Browse the repository at this point in the history
Don't try to install it for non-LTS Ubuntu versions
  • Loading branch information
MartinNowack authored and ccadar committed Mar 30, 2022
1 parent c22c7d5 commit 23548f0
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 49 deletions.
38 changes: 22 additions & 16 deletions scripts/build/p-klee-linux-ubuntu.inc
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
install_build_dependencies_klee() {
source "${DIR}/common-functions"

# Add Kitware's certificate for CMake
dependencies=(
apt-transport-https
ca-certificates
gnupg
lsb-release
software-properties-common
wget
)

apt -y --no-install-recommends install "${dependencies[@]}"
wget -O - "https://apt.kitware.com/keys/kitware-archive-latest.asc" 2> /dev/null \
| gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg > /dev/null
# Check if the Ubuntu version is an LTS version - otherwise no cmake version available
if [[ $(grep -q LTS /etc/os-release) ]]; then
with_sudo apt update -y
# Add Kitware's certificate for CMake
dependencies=(
apt-transport-https
ca-certificates
gnupg
lsb-release
software-properties-common
wget
)

with_sudo apt -y --no-install-recommends install "${dependencies[@]}"
wget -O - "https://apt.kitware.com/keys/kitware-archive-latest.asc" 2> /dev/null \
| gpg --dearmor - | with_sudo tee /etc/apt/trusted.gpg.d/kitware.gpg > /dev/null

# Add CMake repository
codename="$(lsb_release --codename --short)"
with_sudo apt-add-repository -y "deb https://apt.kitware.com/ubuntu/ ${codename} main"
fi

# Add CMake repository
codename="$(lsb_release --codename --short)"
apt-add-repository "deb https://apt.kitware.com/ubuntu/ ${codename} main"
with_sudo apt update -y

# Install KLEE's dependencies
dependencies=(
Expand Down
34 changes: 19 additions & 15 deletions scripts/build/p-libcxx-linux-ubuntu.inc
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
install_build_dependencies_libcxx() {
source "${DIR}/common-functions"

# Add Kitware's certificate for CMake
dependencies=(
apt-transport-https
ca-certificates
gnupg
lsb-release
software-properties-common
wget
)
# Check if the Ubuntu version is an LTS version - otherwise no cmake version available
if [[ $(grep -q LTS /etc/os-release) ]]; then
with_sudo apt update -y
# Add Kitware's certificate for CMake
dependencies=(
apt-transport-https
ca-certificates
gnupg
lsb-release
software-properties-common
wget
)

apt -y --no-install-recommends install "${dependencies[@]}"
wget -O - "https://apt.kitware.com/keys/kitware-archive-latest.asc" 2> /dev/null \
| gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg > /dev/null
with_sudo apt -y --no-install-recommends install "${dependencies[@]}"
wget -O - "https://apt.kitware.com/keys/kitware-archive-latest.asc" 2> /dev/null \
| gpg --dearmor - | with_sudo tee /etc/apt/trusted.gpg.d/kitware.gpg > /dev/null

# Add CMake repository
codename="$(lsb_release --codename --short)"
apt-add-repository "deb https://apt.kitware.com/ubuntu/ ${codename} main"
# Add CMake repository
codename="$(lsb_release --codename --short)"
with_sudo apt-add-repository -y "deb https://apt.kitware.com/ubuntu/ ${codename} main"
fi

with_sudo apt-get update -y
dependencies=(
Expand Down
43 changes: 25 additions & 18 deletions scripts/build/p-llvm-linux-ubuntu.inc
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
# Build dependencies
install_build_dependencies_llvm() {
apt update -y

# Add Kitware's certificate for CMake
dependencies=(
apt-transport-https
ca-certificates
gnupg
lsb-release
software-properties-common
wget
)
install_build_dependencies_llvm() {
source "${DIR}/common-functions"

apt -y --no-install-recommends install "${dependencies[@]}"
wget -O - "https://apt.kitware.com/keys/kitware-archive-latest.asc" 2> /dev/null \
| gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg > /dev/null
# Check if the Ubuntu version is an LTS version - otherwise no cmake version available
if grep -q LTS /etc/os-release; then
with_sudo apt update -y
# Add Kitware's certificate for CMake
dependencies=(
apt-transport-https
ca-certificates
gnupg
lsb-release
software-properties-common
wget
)

with_sudo apt -y --no-install-recommends install "${dependencies[@]}"
wget -O - "https://apt.kitware.com/keys/kitware-archive-latest.asc" 2> /dev/null \
| gpg --dearmor - | with_sudo tee /etc/apt/trusted.gpg.d/kitware.gpg > /dev/null

# Add CMake repository
codename="$(lsb_release --codename --short)"
with_sudo apt-add-repository -y "deb https://apt.kitware.com/ubuntu/ ${codename} main"
fi

# Add CMake repository
codename="$(lsb_release --codename --short)"
apt-add-repository "deb https://apt.kitware.com/ubuntu/ ${codename} main"
with_sudo apt update -y

dependencies=(
ca-certificates
build-essential
autoconf
automake
Expand Down

0 comments on commit 23548f0

Please sign in to comment.