diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2022-03-25 23:02:13 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2022-03-30 12:18:59 +0100 |
commit | 23548f09b7bff999b0b346a5511b2a316ec798b4 (patch) | |
tree | 159060f8724d286791ce32a8e4bbfa95ea86e1f0 /scripts | |
parent | c22c7d53123583133948fac0c129798afcd1be77 (diff) | |
download | klee-23548f09b7bff999b0b346a5511b2a316ec798b4.tar.gz |
Kitware's cmake is not available for non-LTS Ubuntu versions
Don't try to install it for non-LTS Ubuntu versions
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/p-klee-linux-ubuntu.inc | 38 | ||||
-rw-r--r-- | scripts/build/p-libcxx-linux-ubuntu.inc | 34 | ||||
-rw-r--r-- | scripts/build/p-llvm-linux-ubuntu.inc | 43 |
3 files changed, 66 insertions, 49 deletions
diff --git a/scripts/build/p-klee-linux-ubuntu.inc b/scripts/build/p-klee-linux-ubuntu.inc index e7c8e92e..5e7f8135 100644 --- a/scripts/build/p-klee-linux-ubuntu.inc +++ b/scripts/build/p-klee-linux-ubuntu.inc @@ -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=( diff --git a/scripts/build/p-libcxx-linux-ubuntu.inc b/scripts/build/p-libcxx-linux-ubuntu.inc index 8fd8a056..36333f19 100644 --- a/scripts/build/p-libcxx-linux-ubuntu.inc +++ b/scripts/build/p-libcxx-linux-ubuntu.inc @@ -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=( diff --git a/scripts/build/p-llvm-linux-ubuntu.inc b/scripts/build/p-llvm-linux-ubuntu.inc index 1474d1da..83e02d8e 100644 --- a/scripts/build/p-llvm-linux-ubuntu.inc +++ b/scripts/build/p-llvm-linux-ubuntu.inc @@ -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 |