PROJECT (deal.II)
set (VERSION "8.0.pre")
-CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
+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_INCLUDE_CURRENT_DIR "true")
+
INCLUDE_DIRECTORIES(
"${CMAKE_SOURCE_DIR}/contrib/tbb/tbb30_104oss/include" #TODO
"${CMAKE_SOURCE_DIR}/contrib" #TODO
"${CMAKE_SOURCE_DIR}/include/"
)
-# ADD_SUBDIRECTORY(contrib)
+ADD_SUBDIRECTORY(common/expand_instantiations)
+
ADD_SUBDIRECTORY(source)
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_distributed
grid_refinement.cc
solution_transfer.cc
tria.cc
)
-add_library(OBJ_DISTRIBUTED OBJECT ${SRC_DISTRIBUTED})
+SET(inst_in_files
+ grid_refinement.inst.in
+ solution_transfer.inst.in
+ 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})
+