Skip to content

Commit

Permalink
Update norlab build_system cmake dependency install
Browse files Browse the repository at this point in the history
  • Loading branch information
boxanm committed Dec 10, 2024
1 parent 2eae627 commit e512f47
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@ sudo apt-get update &&
g++ \
catch \
make \
cmake \
cmake-gui &&
python3-pip
sudo rm -rf /var/lib/apt/lists/*

##cmake --version

# Retrieve ubuntu version number: DISTRIB_RELEASE
Expand All @@ -106,6 +104,23 @@ fi
n2st::teamcity_service_msg_blockClosed
# .................................................................................................

n2st::teamcity_service_msg_blockOpened "Install a newer CMake version"
dpkg -l | grep -q "^ii cmake" && sudo apt remove --purge --auto-remove cmake
if [[ ${DISTRIB_RELEASE} == '18.04' ]]; then
sudo apt update && \
sudo apt install -y software-properties-common lsb-release && \
sudo apt clean all
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
sudo apt update
sudo apt install -y cmake
else
PIP_BREAK_SYSTEM_PACKAGES=1 python3 -m pip install cmake
fi
print_msg "Cmake version is $(cmake --version)"
n2st::teamcity_service_msg_blockClosed
# .................................................................................................

# (Priority) ToDo: add check to see if executed in a docker container. Current check does not do what its intended
if [[ ${IS_TEAMCITY_RUN} == true ]]; then
n2st::print_msg "The install script is run in teamCity >> the python install step was executed earlier in the Dockerfile.dependencies"
Expand Down

0 comments on commit e512f47

Please sign in to comment.