From 1b38e2412c52993e7086be4873d7c97dd68aa532 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Sun, 31 Aug 2025 23:18:41 +0200 Subject: [PATCH] =?UTF-8?q?Aktualisiere=20das=20Build-Skript=20in=20deploy?= =?UTF-8?q?.sh,=20um=20den=20C++=20Standard=20auf=20Version=2023=20zu=20se?= =?UTF-8?q?tzen.=20=C3=84ndere=20die=20Installation=20des=20C++=20Compiler?= =?UTF-8?q?s=20in=20install-dependencies-ubuntu22.sh,=20um=20GCC=2015=20zu?= =?UTF-8?q?=20installieren=20und=20als=20Standard-Compiler=20festzulegen.?= =?UTF-8?q?=20Entferne=20die=20vorherige=20Installation=20von=20GCC=2011.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 2 +- install-dependencies-ubuntu22.sh | 24 +++++++++++++++++++++--- install-gcc15-ubuntu22.sh | 0 3 files changed, 22 insertions(+), 4 deletions(-) mode change 100644 => 100755 install-gcc15-ubuntu22.sh diff --git a/deploy.sh b/deploy.sh index 82bfe74..02a4a64 100755 --- a/deploy.sh +++ b/deploy.sh @@ -52,7 +52,7 @@ if [ ! -d "build" ]; then fi cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 +cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=23 make -j$(nproc) cd .. diff --git a/install-dependencies-ubuntu22.sh b/install-dependencies-ubuntu22.sh index 8b62936..63ae8b8 100644 --- a/install-dependencies-ubuntu22.sh +++ b/install-dependencies-ubuntu22.sh @@ -50,9 +50,27 @@ apt install -y \ wget \ software-properties-common -# Installiere Standard C++ Compiler (GCC 11) -log_info "Installiere GCC 11 (Standard für Ubuntu 22.04)..." -apt install -y gcc g++ +# Installiere GCC 15 für C++23 Support +log_info "Installiere GCC 15 für C++23 Support..." +apt install -y software-properties-common + +# Füge Ubuntu Toolchain PPA hinzu +add-apt-repository -y ppa:ubuntu-toolchain-r/test +apt update + +# Installiere GCC 15 +if apt install -y gcc-15 g++-15; then + log_success "GCC 15 erfolgreich installiert" + + # Setze GCC 15 als Standard + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 100 + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-15 100 + + log_info "GCC 15 ist jetzt der Standard-Compiler" +else + log_warning "GCC 15 nicht verfügbar, verwende GCC 11" + apt install -y gcc g++ +fi # Prüfe Compiler-Versionen log_info "Verfügbare Compiler-Versionen:" diff --git a/install-gcc15-ubuntu22.sh b/install-gcc15-ubuntu22.sh old mode 100644 new mode 100755