From 96041a4366b6eb03f5715273913be92d4bad1c30 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 6 Feb 2025 09:30:36 -0700 Subject: [PATCH] Exclude more files from compiling if they are functionally empty. --- source/base/CMakeLists.txt | 8 +++++++- source/gmsh/CMakeLists.txt | 21 +++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/source/base/CMakeLists.txt b/source/base/CMakeLists.txt index 9b827593cb..de3cca75d6 100644 --- a/source/base/CMakeLists.txt +++ b/source/base/CMakeLists.txt @@ -28,7 +28,6 @@ set(_unity_include_src exceptions.cc flow_function.cc function.cc - function_cspline.cc function_derivative.cc function_signed_distance.cc function_lib.cc @@ -121,6 +120,13 @@ if(DEAL_II_WITH_HDF5) ) endif() +if(DEAL_II_WITH_GSL) + set(_unity_include_src + ${_unity_include_src} + function_cspline.cc + ) +endif() + # determined by profiling set(_n_includes_per_unity_file 29) diff --git a/source/gmsh/CMakeLists.txt b/source/gmsh/CMakeLists.txt index 5c351f4b7a..6b44f2ebf8 100644 --- a/source/gmsh/CMakeLists.txt +++ b/source/gmsh/CMakeLists.txt @@ -12,13 +12,22 @@ ## ## ------------------------------------------------------------------------ -set(_src - utilities.cc - ) -set(_inst - utilities.inst.in - ) +set(_src) +set(_inst) + +if(DEAL_II_WITH_GMSH) + set(_src + ${_src} + utilities.cc + ) + + set(_inst + ${_inst} + utilities.inst.in + ) +endif() + file(GLOB _header ${CMAKE_SOURCE_DIR}/include/deal.II/gmsh/*.h -- 2.39.5