Skip to content
Snippets Groups Projects
Commit 07f5af91 authored by Robert K's avatar Robert K
Browse files

grid selector

parent 0d02930d
No related branches found
No related tags found
No related merge requests found
......@@ -7,19 +7,24 @@ set(DUNE_ALUGRID_LIBRARY "${PROJECT_BINARY_DIR}/lib/libdunealugrid.a"
CACHE FILEPATH "path to local libs in dune-alugrid" )
mark_as_advanced(DUNE_ALUGRID_LIBRARY)
include(GridSelector)
initialize_grid_selector()
set(GRIDS "")
#define available alugrid types
dune_define_alugridtype(GRID_CONFIG_H_BOTTOM GRIDTYPE ALUGRID_CONFORM
dune_define_alugridtype(GRIDS GRIDTYPE ALUGRID_CONFORM
DUNETYPE "Dune::ALUGrid< dimgrid, dimworld, simplex, conforming >"
HEADERS dune/alugrid/grid.hh dune/alugrid/dgf.hh)
dune_define_alugridtype(GRID_CONFIG_H_BOTTOM GRIDTYPE ALUGRID_CUBE
dune_define_alugridtype(GRIDS GRIDTYPE ALUGRID_CUBE
DUNETYPE "Dune::ALUGrid< dimgrid, dimworld, cube, nonconforming >"
HEADERS dune/alugrid/grid.hh dune/alugrid/dgf.hh)
dune_define_alugridtype(GRID_CONFIG_H_BOTTOM GRIDTYPE ALUGRID_SIMPLEX
dune_define_alugridtype(GRIDS GRIDTYPE ALUGRID_SIMPLEX
DUNETYPE "Dune::ALUGrid< dimgrid, dimworld, simplex, nonconforming >"
HEADERS dune/alugrid/grid.hh dune/alugrid/dgf.hh)
finalize_grid_selector( GRIDS )
# avoid conflicts with normal ALUGrid
if( ALUGRID_CPPFLAGS )
message(ERROR "--with-alugrid conflicts with dune-alugrid module,
......
# check whether the user wants to overload compile flags upon calling make
#
# Provides the following macros:
#
# initialize_compiler_script() : needs to be called before further flags are added to CMAKE_CXX_FLAGS
# finalize_compiler_script() : needs to be called at the end of the cmake macros, e.g. in finalize_dune_project
#
# By default this feature is disabled. Use -DALLOW_CXXFLAGS_OVERWRITE=ON to activate.
# Then the following is possible:
#
# make CXXFLAGS="your flags" GRIDTYPE="grid type"
#
# GRIDTYPE can be anything defined in config.h via the dune_define_gridtype macro from dune-grid.
# Furthermore any CPP variable of the form -DVAR=VALUE can be overloaded on the command line.
#
# Note: If you don't know what this is or what it's good for, don't use it.
#
option(GRID_SELECTOR OFF)
set(GRID_SELECTOR_FILE "")
# init compiler script and store CXX flags
macro(initialize_grid_selector)
if(GRID_SELECTOR)
set(GRID_SELECTOR_FILE ${CMAKE_BINARY_DIR}/gridselector.hh)
file(write ${GRID_SELECTOR_FILE} "// Autogenerated Grid selectors")
endif()
endmacro()
# init compiler script and store CXX flags
macro(finalize_grid_selector output)
if(GRID_SELECTOR)
file(append ${GRID_SELECTOR_FILE} ${output})
endif()
endmacro()
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