From: Daniel Arndt Date: Mon, 17 Sep 2018 18:46:36 +0000 (+0200) Subject: Disable '-Og' for gcc X-Git-Tag: v9.1.0-rc1~706^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7207%2Fhead;p=dealii.git Disable '-Og' for gcc --- diff --git a/cmake/setup_compiler_flags_gnu.cmake b/cmake/setup_compiler_flags_gnu.cmake index ae5496f683..b971b51edd 100644 --- a/cmake/setup_compiler_flags_gnu.cmake +++ b/cmake/setup_compiler_flags_gnu.cmake @@ -182,7 +182,13 @@ IF (CMAKE_BUILD_TYPE MATCHES "Debug") LIST(APPEND DEAL_II_DEFINITIONS_DEBUG "DEBUG") LIST(APPEND DEAL_II_USER_DEFINITIONS_DEBUG "DEBUG") - ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-Og") + # + # In recent versions, gcc often eliminates too much debug information + # using '-Og' to be useful. + # + IF(NOT CMAKE_CXX_COMPILER_ID MATCHES "GNU") + ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-Og") + ENDIF() # # If -Og is not available, fall back to -O0: #