From: Wolfgang Bangerth Date: Sat, 15 Feb 2025 22:51:57 +0000 (-0700) Subject: Exclude CGAL source files when not compiling with CGAL. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34da085a8536c19454627af586a7b89ff5b6e689;p=dealii.git Exclude CGAL source files when not compiling with CGAL. --- 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