Skip to content
Snippets Groups Projects
Commit edb5f6e6 authored by Elias Pipping's avatar Elias Pipping Committed by pipping
Browse files

Regenerate build system using duneproject

This takes care of shipping cmake files, installing documentation
properly, etc.

[[Imported from SVN: r12963]]
parent ccc989e7
No related branches found
No related tags found
No related merge requests found
Showing
with 148 additions and 48 deletions
project("dune-solvers" CXX)
cmake_minimum_required(VERSION 2.8.6) cmake_minimum_required(VERSION 2.8.6)
project(dune-solvers CXX)
if(NOT (dune-common_DIR OR dune-common_ROOT)) if(NOT (dune-common_DIR OR dune-common_ROOT OR
string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR ${PROJECT_BINARY_DIR}) "${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*"))
string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR
${PROJECT_BINARY_DIR})
endif() endif()
#find dune-common and set the module path
find_package(dune-common REQUIRED) find_package(dune-common REQUIRED)
list(APPEND CMAKE_MODULE_PATH ${dune-common_MODULE_PATH}) list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules"
${dune-common_MODULE_PATH})
#include the dune macros
include(DuneMacros) include(DuneMacros)
# start a dune project with information from dune.module
dune_project() dune_project()
add_subdirectory("doc")
add_subdirectory("dune")
add_subdirectory("m4") add_subdirectory("m4")
add_subdirectory("dune")
add_subdirectory("doc")
add_subdirectory("cmake/modules")
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE) finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
# $Id: duneproject 5500 2009-04-03 13:45:04Z sander $ # $Id$
# we need the module file to be able to build via dunecontrol # we need the module file to be able to build via dunecontrol
EXTRA_DIST=dune.module EXTRA_DIST = dune.module \
CMakeLists.txt \
config.h.cmake
SUBDIRS = m4 dune SUBDIRS = m4 dune doc cmake
if BUILD_DOCS if BUILD_DOCS
SUBDIRS += doc SUBDIRS += doc
endif endif
# don't follow the full GNU-standard # don't follow the full GNU-standard
# we need automake 1.5 # we need automake 1.9 or newer
AUTOMAKE_OPTIONS = foreign 1.5 AUTOMAKE_OPTIONS = foreign 1.9
# pass most important options when "make distcheck" is used # pass most important options when "make distcheck" is used
# dune-geometry is a dependency of dune-grid. # dune-geometry is a dependency of dune-grid.
...@@ -19,3 +21,8 @@ DISTCHECK_CONFIGURE_FLAGS = --with-dune-common=$(DUNE_COMMON_ROOT) --with-dune-g ...@@ -19,3 +21,8 @@ DISTCHECK_CONFIGURE_FLAGS = --with-dune-common=$(DUNE_COMMON_ROOT) --with-dune-g
include $(top_srcdir)/am/top-rules include $(top_srcdir)/am/top-rules
include $(top_srcdir)/am/global-rules include $(top_srcdir)/am/global-rules
# Generate package configuration files for finding
# installed modules with CMake
include $(top_srcdir)/am/cmake-pkg-config
...@@ -4,9 +4,9 @@ Preparing the Sources ...@@ -4,9 +4,9 @@ Preparing the Sources
Additional to the software mentioned in README you'll need the Additional to the software mentioned in README you'll need the
following programs installed on your system: following programs installed on your system:
automake >= 1.5 automake >= 1.9
autoconf >= 2.50 autoconf >= 2.62
libtool libtool
...@@ -69,5 +69,5 @@ for further options. ...@@ -69,5 +69,5 @@ for further options.
The full build-system is described in the dune-common/doc/buildsystem (SVN version) or under share/doc/dune-common/buildsystem if you installed DUNE! The full build-system is described in the dune-common/doc/buildsystem (SVN version) or under share/doc/dune-common/buildsystem if you installed DUNE!
$Id: duneproject 5500 2009-04-03 13:45:04Z sander $ $Id$
SUBDIRS = modules
include $(top_srcdir)/am/global-rules
set(modules "DuneSolversMacros.cmake")
install(FILES ${modules} DESTINATION ${DUNE_INSTALL_MODULEDIR})
# File for module specific CMake tests.
MODULES = DuneSolversMacros.cmake
modulesdir = $(datadir)/dune/cmake/modules
dist_modules_DATA = ${MODULES}
include $(top_srcdir)/am/global-rules
EXTRA_DIST = CMakeLists.txt
/* begin solvers
put the definitions for config.h specific to
your project here. Everything above will be
overwritten
*/
/* begin private */
/* Name of package */
#define PACKAGE "@DUNE_MOD_NAME"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "@DUNE_MAINTAINER@"
/* Define to the full name of this package. */
#define PACKAGE_NAME "@DUNE_MOD_NAME@"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "@DUNE_MOD_NAME@ @DUNE_MOD_VERSION@"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "@DUNE_MOD_NAME@"
/* Define to the home page for this package. */
#define PACKAGE_URL "@DUNE_MOD_URL@"
/* Define to the version of this package. */
#define PACKAGE_VERSION "@DUNE_MOD_VERSION@"
/* end private */
/* Define to the version of dune-solvers */
#define DUNE_SOLVERS_VERSION "@DUNE_SOLVERS_VERSION@"
/* Define to the major version of dune-solvers */
#define DUNE_SOLVERS_VERSION_MAJOR @DUNE_SOLVERS_VERSION_MAJOR@
/* Define to the minor version of dune-solvers */
#define DUNE_SOLVERS_VERSION_MINOR @DUNE_SOLVERS_VERSION_MINOR@
/* Define to the revision of dune-solvers */
#define DUNE_SOLVERS_VERSION_REVISION @DUNE_SOLVERS_VERSION_REVISION@
/* end solvers
Everything below here will be overwritten
*/
# -*- Autoconf -*- # -*- Autoconf -*-
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50) AC_PREREQ([2.62])
DUNE_AC_INIT # gets module version from dune.module file DUNE_AC_INIT # gets module version from dune.module file
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([dune-solvers.pc.in]) AC_CONFIG_SRCDIR([dune-solvers.pc.in])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
# Run all checks # we need no more than the standard DE-stuff
# this module depends on dune-common dune-grid dune-istl dune-localfunctions
# this implies checking for [dune-common], [dune-geometry], [dune-grid], [dune-istl], [dune-localfunctions]
DUNE_CHECK_ALL DUNE_CHECK_ALL
# implicitly set the Dune-flags everywhere # implicitly set the Dune-flags everywhere
...@@ -17,6 +19,10 @@ LIBS="$DUNE_LIBS" ...@@ -17,6 +19,10 @@ LIBS="$DUNE_LIBS"
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
cmake/Makefile
cmake/modules/Makefile
doc/Makefile
doc/doxygen/Makefile
doc/doxygen/Doxyfile doc/doxygen/Doxyfile
dune/Makefile dune/Makefile
dune/solvers/Makefile dune/solvers/Makefile
...@@ -27,8 +33,6 @@ AC_CONFIG_FILES([ ...@@ -27,8 +33,6 @@ AC_CONFIG_FILES([
dune/solvers/solvers/Makefile dune/solvers/solvers/Makefile
dune/solvers/test/Makefile dune/solvers/test/Makefile
dune/solvers/transferoperators/Makefile dune/solvers/transferoperators/Makefile
doc/Makefile
doc/doxygen/Makefile
m4/Makefile m4/Makefile
dune-solvers.pc dune-solvers.pc
]) ])
......
add_subdirectory(doxygen) add_subdirectory("doxygen")
install(FILES LOWRANKBRANCH-BACKPORT-CHANGES ${CMAKE_INSTALL_DOCDIR})
\ No newline at end of file
...@@ -3,9 +3,12 @@ SUBDIRS = doxygen ...@@ -3,9 +3,12 @@ SUBDIRS = doxygen
CURDIR = doc CURDIR = doc
BASEDIR = .. BASEDIR = ..
docdir=$(datadir)/doc/dune/solvers # add list of html files to generate from wml
PAGES=
EXTRA_DIST = CMakeLists.txt docdir=$(datadir)/doc/dune-solvers
EXTRA_DIST = CMakeLists.txt LOWRANKBRANCH-BACKPORT-CHANGES
include $(top_srcdir)/am/webstuff include $(top_srcdir)/am/webstuff
include $(top_srcdir)/am/global-rules include $(top_srcdir)/am/global-rules
INPUT += @top_srcdir@/dune/solvers # This file contains local changes to the doxygen configuration
EXCLUDE += # please us '+=' to add file/directories to the lists
EXAMPLE_PATH +=
EXAMPLE_PATTERNS += # The INPUT tag can be used to specify the files and/or directories that contain
IMAGE_PATH += # documented source files. You may enter file names like "myfile.cpp" or
PREDEFINED += DOXYGEN # directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
EXTRA_PACKAGES = amsmath amssymb
INPUT += @top_srcdir@/dune/
# see e.g. dune-grid for the examples of mainpage and modules
# INPUT += @srcdir@/mainpage # @srcdir@/modules
# The EXCLUDE tag can be used to specify files and/or directories that should
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
# EXCLUDE += @top_srcdir@/dune/solvers/test
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
# the \include command).
# EXAMPLE_PATH += @top_srcdir@/src
# The IMAGE_PATH tag can be used to specify one or more files or
# directories that contain image that are included in the documentation (see
# the \image command).
# IMAGE_PATH += @top_srcdir@/dune/solvers/pics
BASEDIR=../.. BASEDIR=../..
CURDIR=doc/doxygen CURDIR=doc/doxygen
WHAT=
doxygendir = $(datadir)/doc/dune/solvers/doxygen EXTRA_DIST = CMakeLists.txt
doxygen_DATA = $(WHAT)
#we need this in the distribution
EXTRA_DIST = $(WHAT) $(DOXYGENDISTFILES)
all: $(WHAT) $(DOXYGENFILES)
include $(top_srcdir)/am/doxygen include $(top_srcdir)/am/doxygen
include $(top_srcdir)/am/global-rules include $(top_srcdir)/am/global-rules
# file to clean only in svn and not in tarball tree
SVNCLEANFILES = html $(WHAT) $(DOXYGENHEADER)
clean-local:
if test "x$(VPATH)" != "x" && test ! -e $(srcdir)/doxygen-tag; then if test -e $(top_srcdir)/doc/doxygen/Doxydep; then rm -rf $(SVNCLEANFILES); fi; fi
...@@ -11,5 +11,5 @@ Version: @VERSION@ ...@@ -11,5 +11,5 @@ Version: @VERSION@
Description: dune-solvers module Description: dune-solvers module
URL: http://dune-project.org/ URL: http://dune-project.org/
Requires: dune-common dune-grid dune-istl Requires: dune-common dune-grid dune-istl
Libs: -L Libs: -L${libdir}
Cflags: -I Cflags: -I${includedir}
add_subdirectory("solvers") add_subdirectory(solvers)
# $Id: $
SUBDIRS = solvers SUBDIRS = solvers
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules include $(top_srcdir)/am/global-rules
...@@ -4,4 +4,6 @@ SUBDIRS = common iterationsteps norms operators solvers test transferoperators ...@@ -4,4 +4,6 @@ SUBDIRS = common iterationsteps norms operators solvers test transferoperators
dune_solversdir = $(includedir)/dune/solvers dune_solversdir = $(includedir)/dune/solvers
dune_solvers_HEADERS = computeenergy.hh dune_solvers_HEADERS = computeenergy.hh
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules include $(top_srcdir)/am/global-rules
...@@ -11,4 +11,6 @@ common_HEADERS = arithmetic.hh \ ...@@ -11,4 +11,6 @@ common_HEADERS = arithmetic.hh \
preconditioner.hh \ preconditioner.hh \
staticmatrixtools.hh staticmatrixtools.hh
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules include $(top_srcdir)/am/global-rules
...@@ -24,4 +24,6 @@ iterationsteps_HEADERS = amgstep.hh \ ...@@ -24,4 +24,6 @@ iterationsteps_HEADERS = amgstep.hh \
trustregiongsstep.cc \ trustregiongsstep.cc \
trustregiongsstep.hh trustregiongsstep.hh
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules include $(top_srcdir)/am/global-rules
...@@ -4,4 +4,6 @@ normsdir = $(includedir)/dune/solvers/norms ...@@ -4,4 +4,6 @@ normsdir = $(includedir)/dune/solvers/norms
norms_HEADERS = blocknorm.hh diagnorm.hh energynorm.hh fullnorm.hh h1seminorm.hh \ norms_HEADERS = blocknorm.hh diagnorm.hh energynorm.hh fullnorm.hh h1seminorm.hh \
norm.hh pnorm.hh sumnorm.hh norm.hh pnorm.hh sumnorm.hh
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules include $(top_srcdir)/am/global-rules
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment