]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: use -Wno-misleading-indentation for grid_generator.cc compilation unit 13950/head
authorMatthias Maier <tamiko@43-1.org>
Fri, 10 Jun 2022 00:05:32 +0000 (19:05 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 10 Jun 2022 00:13:04 +0000 (19:13 -0500)
source/grid/CMakeLists.txt

index d8d27d5a87a5a7bb81ee98e6ad423b2eae34998d..88a236d06eae6efd8788b5569d07b4310b49b78f 100644 (file)
 
 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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.