set (VERSION "8.0.pre")
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.8)
-SET (CMAKE_CXX_FLAGS "-std=c++0x -D_REENTRANT -fPIC -O2 -march=native -Wall -Wfatal-errors -pedantic")
+SET (CMAKE_CXX_FLAGS "-std=c++0x -D_REENTRANT -fPIC -O2 -march=native")
SET (CMAKE_INCLUDE_CURRENT_DIR "true")
-#TODO template-arguments.in
-
ADD_EXECUTABLE(expand_instantiations expand_instantiations.cc)
-GET_TARGET_PROPERTY (
- expand_instantiations_exe
- expand_instantiations
- LOCATION
- )
+#TODO template-arguments.in
-MACRO(macro_expand_instantiations inst_in_files)
+MACRO(macro_expand_instantiations target inst_in_files)
FOREACH (inst_in_file ${inst_in_files})
STRING(REGEX REPLACE "\\.in$" "" inst_file "${inst_in_file}" )
ADD_CUSTOM_COMMAND (
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${inst_file}
- DEPENDS
- expand_instantiations
- COMMAND ${expand_instantiations_exe}
- ARGS
- ~/template-arguments
- < ${CMAKE_CURRENT_SOURCE_DIR}/${inst_in_file}
- > ${CMAKE_CURRENT_BINARY_DIR}/${inst_file}
+ DEPENDS expand_instantiations
+ COMMAND expand_instantiations
+ ARGS ${CMAKE_SOURCE_DIR}/common/expand_instantiations/template-arguments
+ < ${CMAKE_CURRENT_SOURCE_DIR}/${inst_in_file}
+ > ${CMAKE_CURRENT_BINARY_DIR}/${inst_file}
+ )
+ SET(inst_targets
+ ${CMAKE_CURRENT_BINARY_DIR}/${inst_file}
+ ${inst_targets}
)
ENDFOREACH()
+ ADD_CUSTOM_TARGET(${target}.inst ALL DEPENDS ${inst_targets})
+ ADD_DEPENDENCIES(${target} ${target}.inst)
ENDMACRO()
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_SUBDIRECTORY(dofs)
+ADD_SUBDIRECTORY(fe)
+ADD_SUBDIRECTORY(grid)
+ADD_SUBDIRECTORY(hp)
+ADD_SUBDIRECTORY(lac)
+ADD_SUBDIRECTORY(multigrid)
+ADD_SUBDIRECTORY(numerics)
ADD_LIBRARY(deal.II
- $<TARGET_OBJECTS:obj_base>
- $<TARGET_OBJECTS:obj_distributed>
-
- #$<TARGET_OBJECTS:obj_dofs>
- #$<TARGET_OBJECTS:obj_fe>
- #$<TARGET_OBJECTS:obj_grid>
- #$<TARGET_OBJECTS:obj_hp>
- #$<TARGET_OBJECTS:obj_lac>
- #$<TARGET_OBJECTS:obj_multigrid>
- #$<TARGET_OBJECTS:obj_numerics>
- )
+ $<TARGET_OBJECTS:obj_base>
+ $<TARGET_OBJECTS:obj_distributed>
+ $<TARGET_OBJECTS:obj_dofs>
+ $<TARGET_OBJECTS:obj_fe>
+ $<TARGET_OBJECTS:obj_grid>
+ $<TARGET_OBJECTS:obj_hp>
+ $<TARGET_OBJECTS:obj_lac>
+ $<TARGET_OBJECTS:obj_multigrid>
+ $<TARGET_OBJECTS:obj_numerics>
+ )
-SET(src_distributed
+SET(src
grid_refinement.cc
solution_transfer.cc
tria.cc
tria.inst.in
)
-GET_TARGET_PROPERTY (
- expand_instantiations_exe
- expand_instantiations
- LOCATION
- )
-
-FOREACH (inst_in_file ${inst_in_files})
- STRING(REGEX REPLACE "\\.in$" "" inst_file "${inst_in_file}" )
- ADD_CUSTOM_COMMAND (
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${inst_file}
- DEPENDS
- expand_instantiations
- COMMAND ${expand_instantiations_exe}
- ARGS
- ~/template-arguments
- < ${CMAKE_CURRENT_SOURCE_DIR}/${inst_in_file}
- > ${CMAKE_CURRENT_BINARY_DIR}/${inst_file}
- )
-ENDFOREACH()
-
-ADD_LIBRARY(obj_distributed OBJECT ${src_distributed})
-
+ADD_LIBRARY(obj_distributed OBJECT ${src})
+macro_expand_instantiations(obj_distributed "${inst_in_files}")
-set(SRC_DOFS
+SET(src
block_info.cc
dof_accessor.cc
dof_faces.cc
number_cache.cc
)
-add_library(OBJ_DOFS OBJECT ${SRC_DOFS})
+SET(inst_in_files
+ block_info.inst.in
+ dof_accessor.inst.in
+ dof_handler.inst.in
+ dof_handler_policy.inst.in
+ dof_objects.inst.in
+ dof_renumbering.inst.in
+ dof_tools.inst.in
+ )
+
+ADD_LIBRARY(obj_dofs OBJECT ${src})
+macro_expand_instantiations(obj_dofs "${inst_in_files}")
-set(SRC_FE
+SET(src
fe_abf.cc
fe_bdm.cc
fe.cc
mapping_q_eulerian.cc
)
-add_library(OBJ_FE OBJECT ${SRC_FE})
+SET(inst_in_files
+ fe_abf.inst.in
+ fe_bdm.inst.in
+ fe_dgp.inst.in
+ fe_dgp_monomial.inst.in
+ fe_dgp_nonparametric.inst.in
+ fe_dgq.inst.in
+ fe_dg_vector.inst.in
+ fe_face.inst.in
+ fe.inst.in
+ fe_nedelec.inst.in
+ fe_nothing.inst.in
+ fe_poly.inst.in
+ fe_poly_tensor.inst.in
+ fe_q_hierarchical.inst.in
+ fe_q.inst.in
+ fe_raviart_thomas.inst.in
+ fe_raviart_thomas_nodal.inst.in
+ fe_system.inst.in
+ fe_tools.inst.in
+ fe_values.decl.1.inst.in
+ fe_values.decl.2.inst.in
+ fe_values.impl.1.inst.in
+ fe_values.impl.2.inst.in
+ fe_values.inst.in
+ mapping_c1.inst.in
+ mapping_cartesian.inst.in
+ mapping.inst.in
+ mapping_q1_eulerian.inst.in
+ mapping_q1.inst.in
+ mapping_q_eulerian.inst.in
+ mapping_q.inst.in
+ )
+
+ADD_LIBRARY(obj_fe OBJECT ${src})
+macro_expand_instantiations(obj_fe "${inst_in_files}")
+
-set(SRC_GRID
+SET(src
grid_generator.cc
grid_in.cc
grid_out.cc
tria_objects.cc
)
-add_library(OBJ_GRID OBJECT ${SRC_GRID})
+SET(inst_in_files
+ grid_generator.inst.in
+ grid_in.inst.in
+ grid_out.inst.in
+ grid_refinement.inst.in
+ grid_tools.inst.in
+ intergrid_map.inst.in
+ tria_accessor.inst.in
+ tria_boundary.inst.in
+ tria_boundary_lib.inst.in
+ tria.inst.in
+ tria_objects.inst.in
+ )
+
+ADD_LIBRARY(obj_grid OBJECT ${src})
+macro_expand_instantiations(obj_grid "${inst_in_files}")
+
-set(SRC_HP
+SET(src
dof_faces.cc
dof_handler.cc
dof_levels.cc
mapping_collection.cc
)
-add_library(OBJ_HP OBJECT ${SRC_HP})
+SET(inst_in_files
+ dof_handler.inst.in
+ fe_collection.inst.in
+ fe_values.inst.in
+ mapping_collection.inst.in
+ )
+
+ADD_LIBRARY(obj_hp OBJECT ${src})
+macro_expand_instantiations(obj_hp "${inst_in_files}")
-set(SRC_LAC
+SET(src
block_matrix_array.cc
block_sparse_matrix.cc
block_sparse_matrix_ez.cc
vector.cc
vector_memory.cc
vector_view.cc
- )
+)
+
+SET(inst_in_files
+ block_sparse_matrix.inst.in
+ block_vector.inst.in
+ chunk_sparse_matrix.inst.in
+ full_matrix.inst.in
+ operator.inst.in
+ parallel_vector.inst.in
+ precondition_block.inst.in
+ relaxation_block.inst.in
+ sparse_matrix_ez.inst.in
+ sparse_matrix.inst.in
+ trilinos_vector_base.inst.in
+ vector.inst.in
+ vector_memory.inst.in
+ vector_view.inst.in
+)
+
+ADD_LIBRARY(obj_lac OBJECT ${src})
+macro_expand_instantiations(obj_lac "${inst_in_files}")
-add_library(OBJ_LAC OBJECT ${SRC_LAC})
-set(SRC_MULTIGRID
+SET(src
mg_base.cc
mg_dof_accessor.cc
mg_dof_handler.cc
multigrid.cc
)
-add_library(OBJ_MULTIGRID OBJECT ${SRC_MULTIGRID})
+SET(inst_in_files
+ mg_dof_accessor.inst.in
+ mg_dof_handler.inst.in
+ mg_tools.inst.in
+ mg_transfer_block.inst.in
+ mg_transfer_component.inst.in
+ mg_transfer_prebuilt.inst.in
+ )
+
+ADD_LIBRARY(obj_multigrid OBJECT ${src})
+macro_expand_instantiations(obj_multigrid "${inst_in_files}")
+
-set(SRC_NUMERICS
+SET(src
data_out.cc
data_out_faces.cc
data_out_rotation.cc
vectors.cc
)
-add_library(OBJ_NUMERICS OBJECT ${SRC_NUMERICS})
+SET(inst_in_files
+ data_out_faces.inst.in
+ data_out.inst.in
+ data_out_rotation.inst.in
+ data_out_stack.inst.in
+ data_postprocessor.inst.in
+ derivative_approximation.inst.in
+ error_estimator.inst.in
+ fe_field_function.inst.in
+ matrices.inst.in
+ matrix_free.inst.in
+ mesh_worker_info.inst.in
+ mesh_worker_vector_selector.inst.in
+ operator.inst.in
+ point_value_history.inst.in
+ solution_transfer.inst.in
+ time_dependent.inst.in
+ vectors.inst.in
+ )
+
+ADD_LIBRARY(obj_numerics OBJECT ${src})
+macro_expand_instantiations(obj_numerics "${inst_in_files}")
+