From 34da085a8536c19454627af586a7b89ff5b6e689 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 15 Feb 2025 15:51:57 -0700 Subject: [PATCH] Exclude CGAL source files when not compiling with CGAL. --- source/cgal/CMakeLists.txt | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/source/cgal/CMakeLists.txt b/source/cgal/CMakeLists.txt index 8f3304233a..6e4dfef9bf 100644 --- a/source/cgal/CMakeLists.txt +++ b/source/cgal/CMakeLists.txt @@ -12,27 +12,33 @@ ## ## ------------------------------------------------------------------------ -# -# 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 -# + +set(_src) +set(_inst) + if(DEAL_II_WITH_CGAL) + # + # 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 + # 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 -) + set(_src + ${_src} + surface_mesh.cc + intersections.cc + ) -set(_inst -surface_mesh.inst.in -intersections.inst.in -) + set(_inst + ${_inst} + surface_mesh.inst.in + intersections.inst.in + ) +endif() file(GLOB _header ${CMAKE_SOURCE_DIR}/include/deal.II/cgal/*.h -- 2.39.5