Skip to content
Snippets Groups Projects
Commit af7a0ba3 authored by Stefan Girke's avatar Stefan Girke
Browse files

[cmake] added CMakeLists.txt etc

parent 3371ea6e
No related branches found
No related tags found
No related merge requests found
Showing
with 184 additions and 0 deletions
# set up project
project("dune-fem-dg" C CXX)
#circumvent not building docs
set(BUILD_DOCS 1)
# general stuff
cmake_minimum_required(VERSION 2.8.6)
#find dune-common and set the module path
find_package(dune-common)
list(APPEND CMAKE_MODULE_PATH ${dune-common_MODULE_PATH}
"${CMAKE_SOURCE_DIR}/cmake/modules")# make sure our own modules are found
#include the dune macros
include(DuneMacros)
# start a dune project with information from dune.module
dune_project()
# $Id: duneproject 5842 2010-01-20 18:48:34Z joe $
# we need the module file to be able to build via dunecontrol
set(EXTRA_DIST dune.module)
set(SUBDIRS dune m4)
if( BUILD_DOCS)
# TODO: set up documentation tree automatically
#SUBDIRS += doc
endif( BUILD_DOCS )
# don't follow the full GNU-standard
# we need automake 1.5
set(AUTOMAKE_OPTIONS foreign 1.5)
# pass most important options when "make distcheck" is used
set(DISTCHECK_CONFIGURE_FLAGS --with-dune-common=${DUNE_COMMON_ROOT} --with-dune-grid=${DUNE_GRID_ROOT} --with-dune-fem=${DUNE_FEM_ROOT} CXX="${CXX}" CC="${CC}")
# include not needed for CMake
# include $(top_srcdir)/am/top-rules
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
foreach(i ${SUBDIRS})
if(${i} STREQUAL "test")
set(opt EXCLUDE_FROM_ALL)
endif(${i} STREQUAL "test")
add_subdirectory(${i} ${opt})
unset(opt)
endforeach(i ${SUBDIRS})
add_subdirectory(cmake/modules)
# finalize the dune project, e.g., generate config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
set(modules
DuneFemDgMacros.cmake
)
install(FILES "${modules}" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cmake/modules)
message(AUTHOR_WARNING "TODO: Implement module test.")
\ No newline at end of file
/usr/share/automake-1.14/compile
\ No newline at end of file
set(SUBDIRS fem-dg)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
foreach(i ${SUBDIRS})
if(${i} STREQUAL "test")
set(opt EXCLUDE_FROM_ALL)
endif(${i} STREQUAL "test")
add_subdirectory(${i} ${opt})
unset(opt)
endforeach(i ${SUBDIRS})
set(SUBDIRS assemble main misc models operator pass solver stepper test)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
set(femdgdir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg)
set(femdg_HEADERS femdgtest.hh)
install(FILES ${femdg_HEADERS} DESTINATION ${femdgdir})
foreach(i ${SUBDIRS})
if(${i} STREQUAL "test")
set(opt EXCLUDE_FROM_ALL)
endif(${i} STREQUAL "test")
add_subdirectory(${i} ${opt})
unset(opt)
endforeach(i ${SUBDIRS})
set(assembledir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg/assemble)
set(assemble_HEADERS primalmatrix.hh)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${assemble_HEADERS} DESTINATION ${assembledir})
\ No newline at end of file
set(maindir ${top_srcdir}/dune/fem-dg/main)
set(main_HEADERS main.hh codegen.hh codegen2.hh caching.hh caching2.hh
vectorialbasefunctionset.hh default.hh
main_0.cc main_1.cc main_2.cc main_3.cc main_4.cc main.cc main_pol.cc)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${main_HEADERS} DESTINATION ${maindir})
\ No newline at end of file
set(miscdir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg/misc)
set(misc_HEADERS diagnostics.hh cons2prim.hh crs.hh streams.hh)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${misc_HEADERS} DESTINATION ${miscdir})
\ No newline at end of file
set(modelsdir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg/models)
set(models_HEADERS defaultmodel.hh defaultprobleminterfaces.hh)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${models_HEADERS} DESTINATION ${modelsdir})
\ No newline at end of file
set(SUBDIRS adaptation limiter dg fluxes)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
foreach(i ${SUBDIRS})
if(${i} STREQUAL "test")
set(opt EXCLUDE_FROM_ALL)
endif(${i} STREQUAL "test")
add_subdirectory(${i} ${opt})
unset(opt)
endforeach(i ${SUBDIRS})
set(adaptationdir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg/operator/adaptation)
set(adaptation_HEADERS adaptation.cc adaptation.hh
estimatorbase.hh estimator.hh utility.hh)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${adaptation_HEADERS} DESTINATION ${adaptationdir})
\ No newline at end of file
set(dgdir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg/operator/dg)
set(dg_HEADERS discretemodelcommon.hh fluxoperator.hh primaldiscretemodel.hh
dgoperatorchoice.hh fluxdiscretemodel.hh operatorbase.hh primaloperator.hh
passtraits.hh)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${dg_HEADERS} DESTINATION ${dgdir})
\ No newline at end of file
set(fluxesdir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg/operator/fluxes)
set(fluxes_HEADERS averageflux.hh diffusionflux.hh ldgflux.hh
mhd_fluxes.hh rotator.hh dgprimalfluxes.hh eulerfluxes.hh
mhd_eqns.hh mhdfluxes.hh mhd_eqns.cc mhd_fluxes.cc)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${fluxes_HEADERS} DESTINATION ${fluxesdir})
\ No newline at end of file
set(operatordir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg/operator/limiter)
set(operator_HEADERS limiter.hh limitpass.hh limiterdiscretemodel.hh)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${operator_HEADERS} DESTINATION ${operatordir})
\ No newline at end of file
set(passdir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg/pass)
set(pass_HEADERS assembleddiffusionpass.hh dgmodelcaller.hh dgmasspass.hh
dgpass.hh ellipticmodelcaller.hh threadhandle.hh threadpass.hh)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${pass_HEADERS} DESTINATION ${passdir})
\ No newline at end of file
set(solverdir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg/solver)
set(solver_HEADERS smartodesolver.hh rungekuttasolver.hh)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${solver_HEADERS} DESTINATION ${solverdir})
\ No newline at end of file
set(stepperdir ${top_srcdir}/dune/fem-dg/stepper/)
set(stepper_HEADERS advectiondiffusionstepper.hh
advectionstepper.hh
baseevolution.hh
base.hh
ellipt.hh
stepperbase.hh
stepper.hh
steppertraits.hh)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${stepper_HEADERS} DESTINATION ${stepperdir})
\ No newline at end of file
set(SUBDIRS dataio advdiff euler navierstokes)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
set(testdir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg/test)
set(test_HEADERS )
install(FILES ${test_HEADERS} DESTINATION ${testdir})
foreach(i ${SUBDIRS})
if(${i} STREQUAL "test")
set(opt EXCLUDE_FROM_ALL)
endif(${i} STREQUAL "test")
add_subdirectory(${i} ${opt})
unset(opt)
endforeach(i ${SUBDIRS})
# install these headers
set(advdiffdir ${CMAKE_INSTALL_INCLUDEDIR}/test/advdiff)
set(advdiff_HEADERS models.hh problemcreator.hh steppertraits.hh)
set(LDADD ${ALL_PKG_LDFLAGS} ${ALL_PKG_LIBS} ${LOCAL_LIBS} ${DUNEMPILDFLAGS} ${DUNEMPILIBS})
set(BASEDIR ../../main)
#GRIDTYPE = ALUGRID_SIMPLEX
#GRIDTYPE = YASPGRID
#GRIDTYPE=PARALLELGRID_ALUGRID_SIMPLEX
#GRIDTYPE=CARTESIANGRID_ALUGRID_CUBE
set(GRIDTYPE SPGRID)
set(POLORDER 2)
set(GRIDDIM 2)
set(DIMRANGE 1)
install(FILES ${advdiff_HEADERS} DESTINATION ${advdiffdir})
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment