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")
+#TODO:
+SET (CMAKE_CXX_FLAGS "-std=c++0x -D_REENTRANT -fPIC -O2 -march=native")
SET (CMAKE_INCLUDE_CURRENT_DIR "true")
+
+#TODO:
INCLUDE_DIRECTORIES(
- "${CMAKE_SOURCE_DIR}/contrib/tbb/tbb30_104oss/include" #TODO
- "${CMAKE_SOURCE_DIR}/contrib" #TODO
- "${CMAKE_SOURCE_DIR}/include/"
+ ${CMAKE_SOURCE_DIR}/contrib/tbb/tbb30_104oss/include #TODO
+ ${CMAKE_SOURCE_DIR}/contrib #TODO
+
+ ${CMAKE_SOURCE_DIR}/include/
+ ${CMAKE_BINARY_DIR}/configured/
)
+
ADD_SUBDIRECTORY(common/expand_instantiations)
+#ADD_SUBDIRECTORY(contrib)
+
+INCLUDE(${CMAKE_SOURCE_DIR}/contrib/cmake/Macros/macro_expand_instantiations.cmake)
+ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(source)
ADD_EXECUTABLE(expand_instantiations expand_instantiations.cc)
-#TODO template-arguments.in
-
-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
- 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()
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/template-arguments.in
+ ${CMAKE_BINARY_DIR}/configured/template-arguments
+ )
+++ /dev/null
-REAL_SCALARS := { double; float; long double }
-COMPLEX_SCALARS := { std::complex<double>;
- std::complex<float>;
- std::complex<long double> }
-
-DERIVATIVE_TENSORS := { double;
- Tensor<1,deal_II_dimension>;
- Tensor<2,deal_II_dimension> }
-
-DEAL_II_VEC_TEMPLATES := { Vector; BlockVector }
-
-SERIAL_VECTORS := { Vector<double>;
- Vector<float> ;
- Vector<long double>;
-
- BlockVector<double>;
- BlockVector<float>;
- BlockVector<long double>;
-
- parallel::distributed::Vector<double>;
- parallel::distributed::Vector<float> ;
- parallel::distributed::Vector<long double>;
-
- parallel::distributed::BlockVector<double>;
- parallel::distributed::BlockVector<float> ;
- parallel::distributed::BlockVector<long double>;
-
- ;
- ;
- ;
- ;
-
- ;
- ;
- ;
- ;
- }
-
-DOFHANDLERS := { DoFHandler<deal_II_dimension>;
- hp::DoFHandler<deal_II_dimension>;
- MGDoFHandler<deal_II_dimension> }
-
-DOFHANDLER_TEMPLATES := { DoFHandler;
- hp::DoFHandler;
- MGDoFHandler }
-
-TRIANGULATION_AND_DOFHANDLER_TEMPLATES := { Triangulation;
- DoFHandler;
- hp::DoFHandler;
- MGDoFHandler}
-
-TRIANGULATION_AND_DOFHANDLERS := { Triangulation<deal_II_dimension, deal_II_space_dimension>;
- DoFHandler<deal_II_dimension, deal_II_space_dimension>;
- hp::DoFHandler<deal_II_dimension, deal_II_space_dimension>;
- MGDoFHandler<deal_II_dimension, deal_II_space_dimension> }
-
-
-FEVALUES_BASES := { FEValuesBase<deal_II_dimension>;
- FEFaceValuesBase<deal_II_dimension> }
-
-SPARSITY_PATTERNS := { SparsityPattern;
- CompressedSparsityPattern;
- CompressedSetSparsityPattern;
- CompressedSimpleSparsityPattern;
- ;
-
- BlockSparsityPattern;
- BlockCompressedSparsityPattern;
- BlockCompressedSetSparsityPattern;
- BlockCompressedSimpleSparsityPattern;
- ; }
-
-DIMENSIONS := { 1; 2; 3 }
-
-SPACE_DIMENSIONS := { 1; 2; 3 }
--- /dev/null
+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
+ ARGS ${CMAKE_BINARY_DIR}/configured/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()
--- /dev/null
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/deal.II/lac/lapack_templates.h.in
+ ${CMAKE_BINARY_DIR}/configured/deal.II/lac/lapack_templates.h #TODO
+ )
+
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/deal.II/base/config.h.in
+ ${CMAKE_BINARY_DIR}/configured/deal.II/base/config.h #TODO
+ )