]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Exclude CGAL source files when not compiling with CGAL.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 15 Feb 2025 22:51:57 +0000 (15:51 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 16 Feb 2025 05:07:49 +0000 (22:07 -0700)
source/cgal/CMakeLists.txt

index 8f3304233ae40e6e383bd6f6631690ee04aea2e4..6e4dfef9bff754e61c3444dc02ae32dfad990c2b 100644 (file)
 ##
 ## ------------------------------------------------------------------------
 
-#
-# 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

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.