From e32147f4145ea2ba1cb8fbe8caed21014f809e6f Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 8 Aug 2012 19:30:55 +0000 Subject: [PATCH] Revert "Make run under cmake 2.8.3." This reverts commit 1d1f2c9dd212e92fdde474505c9299ef9c1e3903. git-svn-id: https://svn.dealii.org/branches/branch_cmake@25784 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/CMakeLists.txt | 219 ++----------- deal.II/source/Makefile | 368 ++++++++++++++++------ deal.II/source/base/CMakeLists.txt | 51 +++ deal.II/source/distributed/CMakeLists.txt | 7 + deal.II/source/dofs/CMakeLists.txt | 14 + deal.II/source/fe/CMakeLists.txt | 32 ++ deal.II/source/grid/CMakeLists.txt | 19 ++ deal.II/source/hp/CMakeLists.txt | 11 + deal.II/source/lac/CMakeLists.txt | 63 ++++ deal.II/source/multigrid/CMakeLists.txt | 12 + deal.II/source/numerics/CMakeLists.txt | 23 ++ 11 files changed, 521 insertions(+), 298 deletions(-) create mode 100644 deal.II/source/base/CMakeLists.txt create mode 100644 deal.II/source/distributed/CMakeLists.txt create mode 100644 deal.II/source/dofs/CMakeLists.txt create mode 100644 deal.II/source/fe/CMakeLists.txt create mode 100644 deal.II/source/grid/CMakeLists.txt create mode 100644 deal.II/source/hp/CMakeLists.txt create mode 100644 deal.II/source/lac/CMakeLists.txt create mode 100644 deal.II/source/multigrid/CMakeLists.txt create mode 100644 deal.II/source/numerics/CMakeLists.txt diff --git a/deal.II/source/CMakeLists.txt b/deal.II/source/CMakeLists.txt index 5bbed8966b..6c0887504a 100644 --- a/deal.II/source/CMakeLists.txt +++ b/deal.II/source/CMakeLists.txt @@ -1,200 +1,21 @@ -SET(src - base/auto_derivative_function.cc - base/boost_serialization.cc - base/boost_threads.cc - base/conditional_ostream.cc - base/config.cc - base/convergence_table.cc - base/data_out_base.cc - base/event.cc - base/exceptions.cc - base/flow_function.cc - base/function.cc - base/function_derivative.cc - base/function_lib.cc - base/function_lib_cutoff.cc - base/function_parser.cc - base/function_time.cc - base/geometry_info.cc - base/index_set.cc - base/job_identifier.cc - base/logstream.cc - base/memory_consumption.cc - base/mpi.cc - base/multithread_info.cc - base/parallel.cc - base/parameter_handler.cc - base/parsed_function.cc - base/partitioner.cc - base/path_search.cc - base/polynomial.cc - base/polynomials_abf.cc - base/polynomials_adini.cc - base/polynomials_bdm.cc - base/polynomials_nedelec.cc - base/polynomial_space.cc - base/polynomials_p.cc - base/polynomials_raviart_thomas.cc - base/quadrature.cc - base/quadrature_lib.cc - base/quadrature_selector.cc - base/subscriptor.cc - base/symmetric_tensor.cc - base/table_handler.cc - base/tensor_function.cc - base/tensor_product_polynomials.cc - base/thread_management.cc - base/timer.cc - base/utilities.cc - distributed/grid_refinement.cc - distributed/solution_transfer.cc - distributed/tria.cc - dofs/block_info.cc - dofs/dof_accessor.cc - dofs/dof_faces.cc - dofs/dof_handler.cc - dofs/dof_handler_policy.cc - dofs/dof_levels.cc - dofs/dof_objects.cc - dofs/dof_renumbering.cc - dofs/dof_tools.cc - dofs/number_cache.cc - fe/fe_abf.cc - fe/fe_bdm.cc - fe/fe.cc - fe/fe_data.cc - fe/fe_dgp.cc - fe/fe_dgp_monomial.cc - fe/fe_dgp_nonparametric.cc - fe/fe_dgq.cc - fe/fe_dg_vector.cc - fe/fe_face.cc - fe/fe_nedelec.cc - fe/fe_nothing.cc - fe/fe_poly.cc - fe/fe_poly_tensor.cc - fe/fe_q.cc - fe/fe_q_hierarchical.cc - fe/fe_raviart_thomas.cc - fe/fe_raviart_thomas_nodal.cc - fe/fe_system.cc - fe/fe_tools.cc - fe/fe_values.cc - fe/mapping_c1.cc - fe/mapping_cartesian.cc - fe/mapping.cc - fe/mapping_q1.cc - fe/mapping_q1_eulerian.cc - fe/mapping_q.cc - fe/mapping_q_eulerian.cc - grid/grid_generator.cc - grid/grid_in.cc - grid/grid_out.cc - grid/grid_refinement.cc - grid/grid_reordering.cc - grid/grid_tools.cc - grid/intergrid_map.cc - grid/persistent_tria.cc - grid/tria_accessor.cc - grid/tria_boundary.cc - grid/tria_boundary_lib.cc - grid/tria.cc - grid/tria_faces.cc - grid/tria_levels.cc - grid/tria_objects.cc - hp/dof_faces.cc - hp/dof_handler.cc - hp/dof_levels.cc - hp/dof_objects.cc - hp/fe_collection.cc - hp/fe_values.cc - hp/mapping_collection.cc - lac/block_matrix_array.cc - lac/block_sparse_matrix.cc - lac/block_sparse_matrix_ez.cc - lac/block_sparsity_pattern.cc - lac/block_vector.cc - lac/chunk_sparse_matrix.cc - lac/chunk_sparsity_pattern.cc - lac/compressed_set_sparsity_pattern.cc - lac/compressed_simple_sparsity_pattern.cc - lac/compressed_sparsity_pattern.cc - lac/constraint_matrix.cc - lac/full_matrix.cc - lac/lapack_full_matrix.cc - lac/matrix_lib.cc - lac/matrix_out.cc - lac/operator.cc - lac/parallel_vector.cc - lac/petsc_block_sparse_matrix.cc - lac/petsc_full_matrix.cc - lac/petsc_matrix_base.cc - lac/petsc_parallel_block_sparse_matrix.cc - lac/petsc_parallel_block_vector.cc - lac/petsc_parallel_sparse_matrix.cc - lac/petsc_parallel_vector.cc - lac/petsc_precondition.cc - lac/petsc_solver.cc - lac/petsc_sparse_matrix.cc - lac/petsc_vector_base.cc - lac/petsc_vector.cc - lac/precondition_block.cc - lac/precondition_block_ez.cc - lac/relaxation_block.cc - lac/slepc_solver.cc - lac/slepc_spectral_transformation.cc - lac/solver.cc - lac/solver_control.cc - lac/sparse_decomposition.cc - lac/sparse_direct.cc - lac/sparse_ilu.cc - lac/sparse_matrix.cc - lac/sparse_matrix_ez.cc - lac/sparse_mic.cc - lac/sparse_vanka.cc - lac/sparsity_pattern.cc - lac/sparsity_tools.cc - lac/swappable_vector.cc - lac/timestep_control.cc - lac/tridiagonal_matrix.cc - lac/trilinos_block_sparse_matrix.cc - lac/trilinos_block_vector.cc - lac/trilinos_precondition.cc - lac/trilinos_solver.cc - lac/trilinos_sparse_matrix.cc - lac/trilinos_sparsity_pattern.cc - lac/trilinos_vector_base.cc - lac/trilinos_vector.cc - lac/vector.cc - lac/vector_memory.cc - lac/vector_view.cc - multigrid/mg_base.cc - multigrid/mg_dof_accessor.cc - multigrid/mg_dof_handler.cc - multigrid/mg_tools.cc - multigrid/mg_transfer_block.cc - multigrid/mg_transfer_component.cc - multigrid/mg_transfer_prebuilt.cc - multigrid/multigrid.cc - numerics/data_out.cc - numerics/data_out_faces.cc - numerics/data_out_rotation.cc - numerics/data_out_stack.cc - numerics/data_postprocessor.cc - numerics/derivative_approximation.cc - numerics/error_estimator.cc - numerics/fe_field_function.cc - numerics/histogram.cc - numerics/matrices.cc - numerics/matrix_free.cc - numerics/mesh_worker.cc - numerics/mesh_worker_info.cc - numerics/mesh_worker_vector_selector.cc - numerics/operator.cc - numerics/point_value_history.cc - numerics/solution_transfer.cc - numerics/time_dependent.cc - numerics/vectors.cc - ) +ADD_SUBDIRECTORY(base) +ADD_SUBDIRECTORY(distributed) +ADD_SUBDIRECTORY(dofs) +ADD_SUBDIRECTORY(fe) +ADD_SUBDIRECTORY(grid) +ADD_SUBDIRECTORY(hp) +ADD_SUBDIRECTORY(lac) +ADD_SUBDIRECTORY(multigrid) +ADD_SUBDIRECTORY(numerics) -ADD_LIBRARY(deal_II ${src}) +ADD_LIBRARY(deal.II + $ + $ + $ + $ + $ + $ + $ + $ + $ + ) diff --git a/deal.II/source/Makefile b/deal.II/source/Makefile index 54d453da80..2e997901b7 100644 --- a/deal.II/source/Makefile +++ b/deal.II/source/Makefile @@ -1,122 +1,292 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 2.8 +# $Id$ +# Copyright by the deal.II authors, 1998, 1999, 2000, 2001, 2002, 2010, 2011, 2012 -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target -#============================================================================= -# Special targets provided by cmake. +ifneq ($(CLEAN),yes) -# Disable implicit rules so canoncical targets will work. -.SUFFIXES: +# deal.II top level directory +D=.. -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = -.SUFFIXES: .hpux_make_needs_suffix_list +# get options which hold for all files of the project +include $D/common/Make.global_options -# Suppress display of executed commands. -$(VERBOSE).SILENT: +# top level targets +default all: debug optimized -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force -#============================================================================= -# Set environment variables for the build. +# list the directories and the various kinds of files, the ones with the +# largest compile jobs first so that 'make -j N' saturates many processors +# also towards the end of compiling (e.g. numerics/vectors.cc takes several +# minutes to compile...) +all-dirs := numerics fe dofs lac base grid hp multigrid distributed -# The shell in which to execute make rules. -SHELL = /bin/sh +cc-files := $(shell for i in $(all-dirs) ; do echo $D/source/$$i/*.cc ; done) +h-files := $(sort $(shell echo $D/include/deal.II/*/*.h)) -# The CMake executable. -CMAKE_COMMAND = /usr/bin/cmake +# build unique object file names +tmp1 := $(shell echo $(cc-files) | $(PERL) -pi -e 's,$D/source/,,g; s,/,_,g;') +o-files := $(addprefix $(LIBDIR)/optimized/, $(tmp1:.cc=.$(OBJEXT)) ) +go-files := $(addprefix $(LIBDIR)/debug/, $(tmp1:.cc=.$(OBJEXT))) -# The command to remove a file. -RM = /usr/bin/cmake -E remove -f -# The program to use to edit the cache. -CMAKE_EDIT_COMMAND = /usr/bin/ccmake +debug: $(LIBDIR)/libdeal_II.g$(lib-suffix) +optimized: $(LIBDIR)/libdeal_II$(lib-suffix) -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/bangerth/p/deal.II/branch_cmake/deal.II -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/bangerth/p/deal.II/branch_cmake/deal.II -#============================================================================= -# Targets provided globally by CMake. +# rules how to generate object files from source files. +$(LIBDIR)/debug/%.$(OBJEXT) : + @echo "======================debug======$(MT)== $(<:$D/source/%=%)" + @$(CXX) $(CXXFLAGS.g) -c $< -o $@ +$(LIBDIR)/optimized/%.$(OBJEXT) : + @echo "======================optimized==$(MT)== $(<:$D/source/%=%)" + @$(CXX) $(CXXFLAGS.o) -c $< -o $@ -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." - /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : edit_cache -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." - /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache +%.inst : %.inst.in $D/common/template-arguments + @echo "======================instantiate==== $(@F)" + @$D/common/scripts/expand_instantiations $D/common/template-arguments < $< > $@ || exit 1 -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast +%.inst : %.inst.pl $D/common/dealiitemplates.pm + @echo "======================instantiate==== $(@F)" + @perl -I $D/common/ $< > $@ || exit 1 -# The main all target -all: cmake_check_build_system - cd /home/bangerth/p/deal.II/branch_cmake/deal.II && $(CMAKE_COMMAND) -E cmake_progress_start /home/bangerth/p/deal.II/branch_cmake/deal.II/CMakeFiles /home/bangerth/p/deal.II/branch_cmake/deal.II/source/CMakeFiles/progress.marks - cd /home/bangerth/p/deal.II/branch_cmake/deal.II && $(MAKE) -f CMakeFiles/Makefile2 source/all - $(CMAKE_COMMAND) -E cmake_progress_start /home/bangerth/p/deal.II/branch_cmake/deal.II/CMakeFiles 0 -.PHONY : all +#Todo: remove this target after renaming files +%.inst : %.pl $D/common/dealiitemplates.pm + @echo "======================instantiate==== $(@F)" + @perl -I $D/common/ $< > $@ || exit 1 + + + +# there are extra .o file for the function parser and umfpack that we +# need to link into out library +ifeq ($(enable-parser),yes) + extra-o-files := $(LIBDIR)/contrib/functionparser/fparser.$(OBJEXT) + extra-g.o-files := $(LIBDIR)/contrib/functionparser/fparser.$(OBJEXT) +endif + +ifeq ($(USE_CONTRIB_UMFPACK),yes) + umfpack-files := $(sort $(shell echo $(LIBDIR)/contrib/umfpack/*.$(OBJEXT))) + extra-o-files += $(umfpack-files) + extra-g.o-files += $(umfpack-files) +endif + + + +# in general, when linking shared libraries, we will want to link with +# the underlying libs as well. AIX even requires this. on the other +# hand, on DEC OSF with CXX this will fail with duplicate symbols, so +# make sure that it doesn't happen on that system and that compiler +ifneq ($(GXX-VERSION),compaq_cxx) + # if we use HSL, then we need to link against libhsl.so. + ifeq ($(USE_CONTRIB_HSL),yes) + deplibs.g += $(lib-contrib-hsl) + deplibs.o += $(lib-contrib-hsl) + endif + + # same with PETSC + ifeq ($(USE_CONTRIB_PETSC),yes) + deplibs.g += $(lib-contrib-petsc.g) \ + $(call DEAL_II_RPATH,$(DEAL_II_PETSC_LIBDIR)) + deplibs.o += $(lib-contrib-petsc.o) \ + $(call DEAL_II_RPATH,$(DEAL_II_PETSC_LIBDIR)) + endif + + # same with SLEPC + ifeq ($(USE_CONTRIB_SLEPC),yes) + deplibs.g += $(lib-contrib-slepc) \ + $(call DEAL_II_RPATH,$(DEAL_II_SLEPC_LIBDIR)) + deplibs.o += $(lib-contrib-slepc) \ + $(call DEAL_II_RPATH,$(DEAL_II_SLEPC_LIBDIR)) + endif + + # same with TRILINOS + ifeq ($(USE_CONTRIB_TRILINOS),yes) + deplibs.g += $(lib-contrib-trilinos) \ + $(call DEAL_II_RPATH,$(DEAL_II_TRILINOS_LIBDIR)) + deplibs.o += $(lib-contrib-trilinos) \ + $(call DEAL_II_RPATH,$(DEAL_II_TRILINOS_LIBDIR)) + endif + + # same with MUMPS + ifeq ($(USE_CONTRIB_MUMPS),yes) + deplibs.g += $(lib-contrib-mumps) + deplibs.o += $(lib-contrib-mumps) + endif + + # and METIS + ifeq ($(USE_CONTRIB_METIS),yes) + deplibs.g += $(lib-contrib-metis) + deplibs.o += $(lib-contrib-metis) + endif + + # also link with TBB + ifeq ($(enable-threads),yes) + deplibs.g += $D/lib/libtbb_debug$(shared-lib-suffix) + deplibs.o += $D/lib/libtbb$(shared-lib-suffix) + endif + + # and p4est + ifeq ($(USE_CONTRIB_P4EST),yes) + deplibs.g += $(DEAL_II_P4EST_DIR)/DEBUG/$(DEAL_II_P4EST_LIBDIR_NAME)/libp4est$(shared-lib-suffix) \ + $(DEAL_II_P4EST_DIR)/DEBUG/$(DEAL_II_P4EST_LIBDIR_NAME)/libsc$(shared-lib-suffix) \ + $(call DEAL_II_RPATH,$(DEAL_II_P4EST_DIR)/DEBUG/$(DEAL_II_P4EST_LIBDIR_NAME)) + deplibs.o += $(DEAL_II_P4EST_DIR)/FAST/$(DEAL_II_P4EST_LIBDIR_NAME)/libp4est$(shared-lib-suffix) \ + $(DEAL_II_P4EST_DIR)/FAST/$(DEAL_II_P4EST_LIBDIR_NAME)/libsc$(shared-lib-suffix) \ + $(call DEAL_II_RPATH,$(DEAL_II_P4EST_DIR)/FAST/$(DEAL_II_P4EST_LIBDIR_NAME)) + endif + + # for cygwin and darwin, also llapack and such are necessary + # we better link all libraries mentioned in $(LIBS) + ifneq ($(findstring cygwin,$(TARGET))$(findstring darwin,$(TARGET)),) + deplibs.g += $(LIBS) + deplibs.o += $(LIBS) + endif + +else + deplibs.g = + deplibs.o = +endif + + +# rules for static libraries +$(LIBDIR)/libdeal_II.g$(static-lib-suffix): $(go-files) $(extra-g.o-files) + @echo "=====deal.II==========debug======$(MT)== Linking library: $(@F)" + @$(AR) ru $@ $(go-files) $(extra-g.o-files) + @$(RANLIB) $@ +$(LIBDIR)/libdeal_II$(static-lib-suffix): $(o-files) $(extra-o-files) + @echo "=====deal.II==========optimized==$(MT)== Linking library: $(@F)" + @$(AR) ru $@ $(o-files) $(extra-o-files) + @$(RANLIB) $@ + + +# Rules for shared libraries. these are much more difficult to link +# because the linker has to update relocations etc. This requires +# seeking back and forth in memory mapped files and is excruciatingly +# slow on remotely mounted file systems. Consequently, we link in a +# local file in the $TMPDIR directory, and only after the fact move +# them to their final location +$(LIBDIR)/libdeal_II.g$(shared-lib-suffix): $(go-files) $(extra-g.o-files) + @echo "=====deal.II==========debug======$(MT)== Linking library: $(@F)" + @rm -f $@ + @WORKFILE=`mktemp $${TMPDIR:-/tmp}/tmp.XXXXXXXXXX` && \ + $(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $$WORKFILE $(call DEAL_II_ADD_SONAME,deal_II.g) $(go-files) $(extra-g.o-files) $(deplibs.g) && \ + mv $$WORKFILE $(LIBDIR)/$(call DEAL_II_SHLIB_NAME,deal_II.g) + @ln -f -s $(call DEAL_II_SHLIB_NAME,deal_II.g) $@ + +$(LIBDIR)/libdeal_II$(shared-lib-suffix): $(o-files) $(extra-o-files) + @echo "=====deal.II==========optimized==$(MT)== Linking library: $(@F)" + @rm -f $@ + @WORKFILE=`mktemp $${TMPDIR:-/tmp}/tmp.XXXXXXXXXX` && \ + $(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $$WORKFILE $(call DEAL_II_ADD_SONAME,deal_II) $(o-files) $(extra-o-files) $(deplibs.o) && \ + mv $$WORKFILE $(LIBDIR)/$(call DEAL_II_SHLIB_NAME,deal_II) + @ln -f -s $(call DEAL_II_SHLIB_NAME,deal_II) $@ + + + +# generate a file that contains prototypes for BLAS and LAPACK functions +../include/deal.II/lac/lapack_templates.h: ../include/deal.II/lac/lapack_templates.h.in \ + $D/common/scripts/lapack_templates.pl + @echo ===================================== Remaking $@ + @$(PERL) $D/common/scripts/lapack_templates.pl ../include/deal.II/lac/lapack_templates.h.in > $@ + + +# A rule to make sure the various */Makefile.dep files have the right +# dependencies on their source files. Use the opportunity to also ensure that +# .inst and the lapack file are built before everything else +Makefile.dep: ../include/deal.II/lac/lapack_templates.h \ + $(cc-files) + @echo "===================================== Remaking $@" + @for i in $(all-dirs) ; do \ + echo $$i/Makefile.dep: $$i/*.cc \ + $(h-files) \ + Makefile \ + $D/common/Make.global_options ; \ + done >> $@ + @echo "lac/Makefile.dep: $D/include/deal.II/lac/lapack_templates.h.in \ + $D/include/deal.II/lac/lapack_templates.h.in" \ + >> $@ +include Makefile.dep + + +# Rule to generate the dependency files, one for each source +# directory. These file are automagically remade whenever needed, +# i.e. whenever one of the cc-/h-files changed. Make detects whether +# to remake this file upon inclusion below. +# +# If the command fails, then remove Makefile.dep again and fail +%/Makefile.dep: + @echo "===================================== Remaking $@" + @$D/common/scripts/make_dependencies -n $(INCLUDE) "-B\$$(LIBDIR)" \ + $(filter $D/source/$(dir $@)%, $(cc-files)) \ + | $(PERL) -pe 's!LIBDIR\)/(debug|optimized)/(.*):!LIBDIR)/$$1/$(@:%/Makefile.dep=%)_$$2:!g;' \ + > $@ + @if test ! -s $@ ; then \ + echo "*** make_dependencies failed to produce a valid file $@" ; \ + rm $@ ; \ + false ; \ + fi + + +# include all the dependencies +include $(addsuffix /Makefile.dep, $(all-dirs)) + +endif + + + +################### some clean-up rules -# The main clean target clean: - cd /home/bangerth/p/deal.II/branch_cmake/deal.II && $(MAKE) -f CMakeFiles/Makefile2 source/clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd /home/bangerth/p/deal.II/branch_cmake/deal.II && $(MAKE) -f CMakeFiles/Makefile2 source/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd /home/bangerth/p/deal.II/branch_cmake/deal.II && $(MAKE) -f CMakeFiles/Makefile2 source/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd /home/bangerth/p/deal.II/branch_cmake/deal.II && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... rebuild_cache" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd /home/bangerth/p/deal.II/branch_cmake/deal.II && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system + -rm -f Makefile.dep *~ */*~ */*/*~ */Makefile.dep source/*/*.inst \ + $D/lib/{debug,optimized}/*.o + + +################### coverage +# A target that creates a visual representation of which files and +# lines are covered by the testsuite, the example programs, and +# possible other executables. To use this rule, configure deal.II +# as usual, then add "-fprofile-arcs -ftest-coverage" to the following +# variables in common/Make.global_options: +# - SHLIBFLAGS +# - LDFLAGS +# - CXXFLAGS.g +# Then compile the library and run all the executables for which you +# want it reported that. Note, however, that you can't run them in +# parallel or they will step on each other's toes when writing output. +# In other words, the testsuite has to be run with -j1, however long +# that may take. +# +# When all of these programs have been run, the do +# cd source +# make coverage +# This may take a long time: both running lcov and, in particular, +# genhtml can take hours. In the latter case, there isn't even an +# indication that anything is happening, but it is -- just be +# patient, let it run overnight. +coverage: + for dir in $(all-dirs) ; do \ + cd $$dir ; \ + for file in *.cc ; do \ + basename=`echo $$file | perl -pi -e 's/\\.cc$$//;'` ; \ + for ext in o gcda gcno ; do \ + rm -f $${basename}.$$ext ; \ + if test -f $D/lib/debug/$${dir}_$${basename}.$$ext ; then \ + ln $D/lib/debug/$${dir}_$${basename}.$$ext $${basename}.$$ext ; \ + fi ; \ + done ; \ + done ; \ + cd .. ; \ + done + lcov --base-directory . --directory . -c -o d2.info + lcov --remove d2.info "/usr*" -o d2.info + rm -rf ../coverage + genhtml -o ../coverage -t "deal.II test coverage" --num-spaces 8 d2.info + + +################### +.PHONY: default all debug optimized TAGS +.PHONY: clean diff --git a/deal.II/source/base/CMakeLists.txt b/deal.II/source/base/CMakeLists.txt new file mode 100644 index 0000000000..2c2ff37454 --- /dev/null +++ b/deal.II/source/base/CMakeLists.txt @@ -0,0 +1,51 @@ +set(SRC_BASE + auto_derivative_function.cc + boost_serialization.cc + boost_threads.cc + conditional_ostream.cc + config.cc + convergence_table.cc + data_out_base.cc + event.cc + exceptions.cc + flow_function.cc + function.cc + function_derivative.cc + function_lib.cc + function_lib_cutoff.cc + function_parser.cc + function_time.cc + geometry_info.cc + index_set.cc + job_identifier.cc + logstream.cc + memory_consumption.cc + mpi.cc + multithread_info.cc + parallel.cc + parameter_handler.cc + parsed_function.cc + partitioner.cc + path_search.cc + polynomial.cc + polynomials_abf.cc + polynomials_adini.cc + polynomials_bdm.cc + polynomials_nedelec.cc + polynomial_space.cc + polynomials_p.cc + polynomials_raviart_thomas.cc + quadrature.cc + quadrature_lib.cc + quadrature_selector.cc + subscriptor.cc + symmetric_tensor.cc + table_handler.cc + tensor_function.cc + tensor_product_polynomials.cc + thread_management.cc + timer.cc + utilities.cc + ) + +add_library(OBJ_BASE OBJECT ${SRC_BASE}) diff --git a/deal.II/source/distributed/CMakeLists.txt b/deal.II/source/distributed/CMakeLists.txt new file mode 100644 index 0000000000..103308b2d8 --- /dev/null +++ b/deal.II/source/distributed/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SRC_DISTRIBUTED + grid_refinement.cc + solution_transfer.cc + tria.cc + ) + +add_library(OBJ_DISTRIBUTED OBJECT ${SRC_DISTRIBUTED}) diff --git a/deal.II/source/dofs/CMakeLists.txt b/deal.II/source/dofs/CMakeLists.txt new file mode 100644 index 0000000000..6c3736a8a3 --- /dev/null +++ b/deal.II/source/dofs/CMakeLists.txt @@ -0,0 +1,14 @@ +set(SRC_DOFS + block_info.cc + dof_accessor.cc + dof_faces.cc + dof_handler.cc + dof_handler_policy.cc + dof_levels.cc + dof_objects.cc + dof_renumbering.cc + dof_tools.cc + number_cache.cc + ) + +add_library(OBJ_DOFS OBJECT ${SRC_DOFS}) diff --git a/deal.II/source/fe/CMakeLists.txt b/deal.II/source/fe/CMakeLists.txt new file mode 100644 index 0000000000..ab38f42ed0 --- /dev/null +++ b/deal.II/source/fe/CMakeLists.txt @@ -0,0 +1,32 @@ +set(SRC_FE + fe_abf.cc + fe_bdm.cc + fe.cc + fe_data.cc + fe_dgp.cc + fe_dgp_monomial.cc + fe_dgp_nonparametric.cc + fe_dgq.cc + fe_dg_vector.cc + fe_face.cc + fe_nedelec.cc + fe_nothing.cc + fe_poly.cc + fe_poly_tensor.cc + fe_q.cc + fe_q_hierarchical.cc + fe_raviart_thomas.cc + fe_raviart_thomas_nodal.cc + fe_system.cc + fe_tools.cc + fe_values.cc + mapping_c1.cc + mapping_cartesian.cc + mapping.cc + mapping_q1.cc + mapping_q1_eulerian.cc + mapping_q.cc + mapping_q_eulerian.cc + ) + +add_library(OBJ_FE OBJECT ${SRC_FE}) diff --git a/deal.II/source/grid/CMakeLists.txt b/deal.II/source/grid/CMakeLists.txt new file mode 100644 index 0000000000..1e3d46617f --- /dev/null +++ b/deal.II/source/grid/CMakeLists.txt @@ -0,0 +1,19 @@ +set(SRC_GRID + grid_generator.cc + grid_in.cc + grid_out.cc + grid_refinement.cc + grid_reordering.cc + grid_tools.cc + intergrid_map.cc + persistent_tria.cc + tria_accessor.cc + tria_boundary.cc + tria_boundary_lib.cc + tria.cc + tria_faces.cc + tria_levels.cc + tria_objects.cc + ) + +add_library(OBJ_GRID OBJECT ${SRC_GRID}) diff --git a/deal.II/source/hp/CMakeLists.txt b/deal.II/source/hp/CMakeLists.txt new file mode 100644 index 0000000000..0b23fc20c1 --- /dev/null +++ b/deal.II/source/hp/CMakeLists.txt @@ -0,0 +1,11 @@ +set(SRC_HP + dof_faces.cc + dof_handler.cc + dof_levels.cc + dof_objects.cc + fe_collection.cc + fe_values.cc + mapping_collection.cc + ) + +add_library(OBJ_HP OBJECT ${SRC_HP}) diff --git a/deal.II/source/lac/CMakeLists.txt b/deal.II/source/lac/CMakeLists.txt new file mode 100644 index 0000000000..80ea10ef9d --- /dev/null +++ b/deal.II/source/lac/CMakeLists.txt @@ -0,0 +1,63 @@ +set(SRC_LAC + block_matrix_array.cc + block_sparse_matrix.cc + block_sparse_matrix_ez.cc + block_sparsity_pattern.cc + block_vector.cc + chunk_sparse_matrix.cc + chunk_sparsity_pattern.cc + compressed_set_sparsity_pattern.cc + compressed_simple_sparsity_pattern.cc + compressed_sparsity_pattern.cc + constraint_matrix.cc + full_matrix.cc + lapack_full_matrix.cc + matrix_lib.cc + matrix_out.cc + operator.cc + parallel_vector.cc + petsc_block_sparse_matrix.cc + petsc_full_matrix.cc + petsc_matrix_base.cc + petsc_parallel_block_sparse_matrix.cc + petsc_parallel_block_vector.cc + petsc_parallel_sparse_matrix.cc + petsc_parallel_vector.cc + petsc_precondition.cc + petsc_solver.cc + petsc_sparse_matrix.cc + petsc_vector_base.cc + petsc_vector.cc + precondition_block.cc + precondition_block_ez.cc + relaxation_block.cc + slepc_solver.cc + slepc_spectral_transformation.cc + solver.cc + solver_control.cc + sparse_decomposition.cc + sparse_direct.cc + sparse_ilu.cc + sparse_matrix.cc + sparse_matrix_ez.cc + sparse_mic.cc + sparse_vanka.cc + sparsity_pattern.cc + sparsity_tools.cc + swappable_vector.cc + timestep_control.cc + tridiagonal_matrix.cc + trilinos_block_sparse_matrix.cc + trilinos_block_vector.cc + trilinos_precondition.cc + trilinos_solver.cc + trilinos_sparse_matrix.cc + trilinos_sparsity_pattern.cc + trilinos_vector_base.cc + trilinos_vector.cc + vector.cc + vector_memory.cc + vector_view.cc + ) + +add_library(OBJ_LAC OBJECT ${SRC_LAC}) diff --git a/deal.II/source/multigrid/CMakeLists.txt b/deal.II/source/multigrid/CMakeLists.txt new file mode 100644 index 0000000000..2bc54cedf0 --- /dev/null +++ b/deal.II/source/multigrid/CMakeLists.txt @@ -0,0 +1,12 @@ +set(SRC_MULTIGRID + mg_base.cc + mg_dof_accessor.cc + mg_dof_handler.cc + mg_tools.cc + mg_transfer_block.cc + mg_transfer_component.cc + mg_transfer_prebuilt.cc + multigrid.cc + ) + +add_library(OBJ_MULTIGRID OBJECT ${SRC_MULTIGRID}) diff --git a/deal.II/source/numerics/CMakeLists.txt b/deal.II/source/numerics/CMakeLists.txt new file mode 100644 index 0000000000..6b95ce27a3 --- /dev/null +++ b/deal.II/source/numerics/CMakeLists.txt @@ -0,0 +1,23 @@ +set(SRC_NUMERICS + data_out.cc + data_out_faces.cc + data_out_rotation.cc + data_out_stack.cc + data_postprocessor.cc + derivative_approximation.cc + error_estimator.cc + fe_field_function.cc + histogram.cc + matrices.cc + matrix_free.cc + mesh_worker.cc + mesh_worker_info.cc + mesh_worker_vector_selector.cc + operator.cc + point_value_history.cc + solution_transfer.cc + time_dependent.cc + vectors.cc + ) + +add_library(OBJ_NUMERICS OBJECT ${SRC_NUMERICS}) -- 2.39.5