From 7ae4fd04cff50c4eeefd99a223ed33652f27d2f3 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 22 Jun 2023 02:00:32 -0500 Subject: [PATCH] CMake: Update -Wno-misleading-indentation for CGAL --- source/cgal/CMakeLists.txt | 12 ++++++++++++ source/grid/CMakeLists.txt | 5 +++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/source/cgal/CMakeLists.txt b/source/cgal/CMakeLists.txt index 08ea4ad6d6..da37863c32 100644 --- a/source/cgal/CMakeLists.txt +++ b/source/cgal/CMakeLists.txt @@ -13,6 +13,18 @@ ## ## --------------------------------------------------------------------- +# +# We have to compile the "intersections.cc" file without the misleading +# indentation warning enabled. Otherwise, we run into quite a number of +# warnings with gcc, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549 +# +if(DEAL_II_WITH_CGAL) + enable_if_supported(_flag "-Wno-misleading-indentation") + set_property(SOURCE "intersections.cc" + APPEND PROPERTY COMPILE_OPTIONS "${_flag}" + ) +endif() + set(_src surface_mesh.cc intersections.cc diff --git a/source/grid/CMakeLists.txt b/source/grid/CMakeLists.txt index ff55216403..6cd29b439f 100644 --- a/source/grid/CMakeLists.txt +++ b/source/grid/CMakeLists.txt @@ -21,11 +21,12 @@ # due to a longstanding bug in gcc. Thus, simply set # -Wno-misleading-indentation on the command line for the # grid_generator_cgal.cc compilation unit. +# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549 # if(DEAL_II_WITH_CGAL) enable_if_supported(_flag "-Wno-misleading-indentation") - set_property(SOURCE "grid_generator_cgal.cc" - APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flag}" + set_property(SOURCE "grid_generator_cgal.cc" "grid_tools.cc" + APPEND PROPERTY COMPILE_OPTIONS "${_flag}" ) endif() -- 2.39.5