From 84a40d2994aefa186a8ce7c43e08946baecf644d Mon Sep 17 00:00:00 2001
From: Alberto Nidasio <nidasioalberto@gmail.com>
Date: Fri, 2 Aug 2024 17:30:21 +0200
Subject: [PATCH] [CMake] Avoid setting `CMAKE_BUILD_TYPE` in CMakeLists.txt

---
 .gitlab-ci.yml | 4 ++--
 CMakeLists.txt | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0224fd67..b453b6b8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -60,7 +60,7 @@ build_linux:
   before_script:
     - QMAKE=/opt/qt/$QT_VERSION/gcc_64/bin/qmake
   script:
-    - cmake -Bbuild -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .
+    - cmake -Bbuild -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=RelWithDebInfo .
     - cmake --build build -j 16
     - cd build
     - linuxdeploy --plugin qt -e groundstation -d ../linuxdeploy/groundstation.desktop -i ../linuxdeploy/SkywardLogo.png --appdir AppDir
@@ -78,7 +78,7 @@ build_windows:
   before_script:
     - export PATH=/home/gitlab-runner/mxe/usr/bin:$PATH
   script:
-    - x86_64-w64-mingw32.static-cmake -Bbuild -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .
+    - x86_64-w64-mingw32.static-cmake -Bbuild -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=RelWithDebInfo .
     - x86_64-w64-mingw32.static-cmake --build build -j 16
     - mv build/groundstation.exe Ground_Station-$CI_COMMIT_SHORT_SHA.exe
   artifacts:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6f386e77..4be60d44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,8 +20,6 @@
 # THE SOFTWARE.
 
 cmake_minimum_required(VERSION 3.16)
-# For now we keep debug information on
-set(CMAKE_BUILD_TYPE RelWithDebInfo)
 
 project(SkywardHub)
 
-- 
GitLab