diff --git a/LCG_100/x86_64_v3-centos7-gcc10-opt+g.cmake b/LCG_100/x86_64_v3-centos7-gcc10-opt+g.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..44f4c5e0b42033d738e0ff3bff6eabf184dc1922
--- /dev/null
+++ b/LCG_100/x86_64_v3-centos7-gcc10-opt+g.cmake
@@ -0,0 +1,17 @@
+###############################################################################
+# (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration           #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+include_guard(GLOBAL)
+
+set(LHCB_PLATFORM x86_64_v3-centos7-gcc10-opt+g)
+set(LCG_ARCHITECTURE x86_64_v3)
+set(LCG_OPTIMIZATION "opt+g" )
+include(${CMAKE_CURRENT_LIST_DIR}/x86_64-centos7-gcc10-opt.cmake)
+
diff --git a/LCG_101/x86_64_v2-centos7-gcc10-do0.cmake b/LCG_101/x86_64_v2-centos7-gcc10-do0.cmake
index 3bf85780a402915560bbb64eed83c97bd71befcf..e3de5325702f5f41425080c340eea97823165b8c 100644
--- a/LCG_101/x86_64_v2-centos7-gcc10-do0.cmake
+++ b/LCG_101/x86_64_v2-centos7-gcc10-do0.cmake
@@ -17,4 +17,5 @@ include_guard(GLOBAL)
 
 set(LHCB_PLATFORM x86_64_v2-centos7-gcc10-do0)
 set(LCG_ARCHITECTURE x86_64_v2)
+set(LCG_OPTIMIZATION "do0" )
 include(${CMAKE_CURRENT_LIST_DIR}/x86_64-centos7-gcc10-dbg.cmake)
diff --git a/LCG_101/x86_64_v2-centos7-gcc11-do0.cmake b/LCG_101/x86_64_v2-centos7-gcc11-do0.cmake
index 60e248c8d26a0042c6f6a0c39dab9a928e06d4ff..ad20f5a0a13e6abba0b8824c075a6d29f3a3e0b8 100644
--- a/LCG_101/x86_64_v2-centos7-gcc11-do0.cmake
+++ b/LCG_101/x86_64_v2-centos7-gcc11-do0.cmake
@@ -17,4 +17,5 @@ include_guard(GLOBAL)
 
 set(LHCB_PLATFORM x86_64_v2-centos7-gcc11-do0)
 set(LCG_ARCHITECTURE x86_64_v2)
+set(LCG_OPTIMIZATION "do0" )
 include(${CMAKE_CURRENT_LIST_DIR}/x86_64-centos7-gcc11-dbg.cmake)
diff --git a/LCG_101/x86_64_v3-centos7-gcc10-opt+g.cmake b/LCG_101/x86_64_v3-centos7-gcc10-opt+g.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..44f4c5e0b42033d738e0ff3bff6eabf184dc1922
--- /dev/null
+++ b/LCG_101/x86_64_v3-centos7-gcc10-opt+g.cmake
@@ -0,0 +1,17 @@
+###############################################################################
+# (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration           #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+include_guard(GLOBAL)
+
+set(LHCB_PLATFORM x86_64_v3-centos7-gcc10-opt+g)
+set(LCG_ARCHITECTURE x86_64_v3)
+set(LCG_OPTIMIZATION "opt+g" )
+include(${CMAKE_CURRENT_LIST_DIR}/x86_64-centos7-gcc10-opt.cmake)
+
diff --git a/LCG_101/x86_64_v3-centos7-gcc11-opt+g.cmake b/LCG_101/x86_64_v3-centos7-gcc11-opt+g.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..1c023d83b158bdbbb1047287d9a4dfd03e4576aa
--- /dev/null
+++ b/LCG_101/x86_64_v3-centos7-gcc11-opt+g.cmake
@@ -0,0 +1,17 @@
+###############################################################################
+# (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration           #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+include_guard(GLOBAL)
+
+set(LHCB_PLATFORM x86_64_v3-centos7-gcc11-opt+g)
+set(LCG_ARCHITECTURE x86_64_v3)
+set(LCG_OPTIMIZATION "opt+g" )
+include(${CMAKE_CURRENT_LIST_DIR}/x86_64-centos7-gcc11-opt.cmake)
+
diff --git a/fragments/compilation_flags.cmake b/fragments/compilation_flags.cmake
index 229d4c171dc5cf3aeaea5b22484459461b43e1b5..6d6ca93306e7f6a37f88f69215825b0ef75a6b2a 100644
--- a/fragments/compilation_flags.cmake
+++ b/fragments/compilation_flags.cmake
@@ -1,10 +1,15 @@
 cmake_minimum_required(VERSION 3.15)
 
-set(CMAKE_CONFIGURATION_TYPES Release Debug FastDebug)
+set(CMAKE_CONFIGURATION_TYPES Release Debug FastDebug RelWithDebInfo)
 set(CMAKE_C_FLAGS_FASTDEBUG_INIT "-g -Og")
 set(CMAKE_CXX_FLAGS_FASTDEBUG_INIT "-g -Og")
 set(CMAKE_Fortran_FLAGS_FASTDEBUG_INIT "-g -Og")
 
+# can't use the _INIT variables because CMAKE then appends "-O2 -g -DNDEBG"
+set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -DNDEBUG -g" CACHE STRING "Flags used by the C compiler during RELWITHDEBINFO builds.")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -DNDEBUG -g" CACHE STRING "Flags used by the CXX compiler during RELWITHDEBINFO builds.")
+set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-O3 -DNDEBUG -g" CACHE STRING "Flags used by the Fortran compiler during RELWITHDEBINFO builds." )
+
 # Options to fine tune the compilation flags
 option(LCG_DIAGNOSTICS_COLOR "force colors in compiler diagnostics" OFF)
 option(GAUDI_DIAGNOSTICS_COLOR "[deprecated] use LCG_DIAGNOSTICS_COLOR" OFF)
@@ -13,6 +18,8 @@ option(GAUDI_DIAGNOSTICS_COLOR "[deprecated] use LCG_DIAGNOSTICS_COLOR" OFF)
 if(NOT CMAKE_BUILD_TYPE)
   if(LCG_OPTIMIZATION STREQUAL "opt")
     set(CMAKE_BUILD_TYPE Release)
+  elseif(LCG_OPTIMIZATION STREQUAL "opt+g")
+    set(CMAKE_BUILD_TYPE RelWithDebInfo)
   elseif(LCG_OPTIMIZATION STREQUAL "do0")
     set(CMAKE_BUILD_TYPE Debug)
   elseif(LCG_OPTIMIZATION STREQUAL "dbg")