From: Matthias Maier Date: Fri, 10 Jun 2022 00:05:32 +0000 (-0500) Subject: CMake: use -Wno-misleading-indentation for grid_generator.cc compilation unit X-Git-Tag: v9.4.0-rc1~42^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cb81c9e627c1eb97c0b35e12e7ae95abc0ea595;p=dealii.git CMake: use -Wno-misleading-indentation for grid_generator.cc compilation unit --- diff --git a/source/grid/CMakeLists.txt b/source/grid/CMakeLists.txt index d8d27d5a87..88a236d06e 100644 --- a/source/grid/CMakeLists.txt +++ b/source/grid/CMakeLists.txt @@ -15,6 +15,23 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) +# +# Work around an issue where gcc emits a note that the warning +# -Wmisleading-indentation will be disabled due to a humongous line of over +# 100k characters produced by one of the CGAL headers. Unfortunately, +# guarding the include by DEAL_II_DISABLE_EXTRA_DIAGNOSTICS is not enough +# due to a longstanding bug in gcc. Thus, simply wet +# -Wno-misleading-indentation on the command line for the grid_generator.cc +# compilation unit. +# +IF(DEAL_II_WITH_CGAL) + ENABLE_IF_SUPPORTED(_flag "-Wno-misleading-indentation") + SET_PROPERTY(SOURCE "grid_generator.cc" + APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flag}" + ) +ENDIF() + + SET(_unity_include_src cell_id.cc grid_refinement.cc