Skip to content
Snippets Groups Projects
Commit 46484c49 authored by Martin Nolte's avatar Martin Nolte
Browse files

update CMake build system and remove autotools support

parent 0c693ff0
No related branches found
No related tags found
No related merge requests found
Showing
with 44 additions and 216 deletions
/aclocal.m4
/am
/autom4te.cache
/compile
/configure
/config.guess
/config.h
/config.h.in
/config.lt
/config.status
/config.sub
/depcomp
/dependencies.m4
/dune-polygongrid.pc
/dune-polygongrid-*.tar.gz
/install-sh
/libtool
/ltmain.sh
/missing
/stamp-h1
/test-driver
.deps/
.libs/
Makefile
Makefile.in
/build-*/
*~
*.la
*.lo
*.log
*.o
*.swp
project("dune-polygongrid" C CXX)
cmake_minimum_required(VERSION 2.8.6)
project( "dune-polygongrid" C CXX )
cmake_minimum_required( VERSION 2.8.6 )
find_package(dune-common)
list(APPEND CMAKE_MODULE_PATH ${dune-common_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules")
find_package( dune-common )
list( APPEND CMAKE_MODULE_PATH ${dune-common_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules" )
include(DuneMacros)
include( DuneMacros )
dune_project()
add_subdirectory(cmake/modules)
add_subdirectory(dune)
add_subdirectory(polygongrid)
add_subdirectory(m4)
add_subdirectory( cmake/modules )
add_subdirectory( dune )
add_subdirectory( polygongrid )
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
finalize_dune_project( GENERATE_CONFIG_H_CMAKE )
EXTRA_DIST = dune.module
EXTRA_DIST += CMakeLists.txt dune-polygongrid-config.cmake.in dune-polygongrid-version.cmake.in
SUBDIRS = cmake m4 dune polygongrid
DISTCHECK_CONFIGURE_FLAGS = --with-dune-common=$(DUNE_COMMON_ROOT) --with-dune-grid=$(DUNE_GRID_ROOT) CXX="$(CXX)" CC="$(CC)"
SOURCEFILE_MASK = -name \*.h -o -name \*.hh -o -name \*.c -o -name \*.cc
# add library name, authors list, and license to source files
dist-hook:
@for SOURCEFILE in `find $(distdir) \( $(SOURCEFILE_MASK) \) -print` ; do \
TMPFILE=`mktemp authors.XXXXXX` ; \
echo "/******************************************************************************" > $$TMPFILE ; \
echo "" >> $$TMPFILE ; \
cat $(top_srcdir)/AUTHORS >> $$TMPFILE ; \
echo "" >> $$TMPFILE ; \
echo "******************************************************************************/" >> $$TMPFILE ; \
echo "" >> $$TMPFILE ; \
cat $$SOURCEFILE >> $$TMPFILE ; \
cp $$TMPFILE $$SOURCEFILE ; \
rm -f $$TMPFILE ; \
done
include $(top_srcdir)/am/top-rules
include $(top_srcdir)/am/global-rules
SUBDIRS = modules pkg
include $(top_srcdir)/am/global-rules
install(FILES DunePolygongridMacros.cmake
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cmake/modules)
set( MODULES
DunePolygongridMacros.cmake
)
install( FILES ${MODULES} DESTINATION ${DUNE_INSTALL_MODULEDIR} )
MODULES = DunePolygongridMacros.cmake
modulesdir = $(datadir)/cmake/modules
dist_modules_DATA = ${MODULES}
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules
EXTRA_DIST = dune-polygongrid-config.cmake.in
include $(top_srcdir)/am/global-rules
if(NOT @DUNE_MOD_NAME@_FOUND)
#compute installation prefix relative to this file
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_prefix "${_dir}/../../.." ABSOLUTE)
#import the target
if(EXISTS "${_prefix}/lib/cmake/@DUNE_MOD_NAME@-targets.cmake")
include("${_prefix}/lib/cmake/@DUNE_MOD_NAME@-targets.cmake")
endif(EXISTS "${_prefix}/lib/cmake/@DUNE_MOD_NAME@-targets.cmake")
#report other information
set(@DUNE_MOD_NAME@_PREFIX "${_prefix}")
set(@DUNE_MOD_NAME@_INCLUDE_DIRS "${_prefix}/include")
set(@DUNE_MOD_NAME@_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_DEBUG "@CMAKE_CXX_FLAGS_DEBUG@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_MINSIZEREL "@CMAKE_CXX_FLAGS_MINSIZEREL@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_RELEASE "@CMAKE_CXX_FLAGS_RELEASE@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_RELWITHDEBINFO "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@")
set(@DUNE_MOD_NAME@_LIBRARIES "")
set(@DUNE_MOD_NAME@_DEPENDS "@DUNE_DEPENDS@")
set(@DUNE_MOD_NAME@_SUGGESTS "@DUNE_SUGGESTS@")
set(@DUNE_MOD_NAME@_MODULE_PATH "@DUNE_INSTALL_MODULEDIR@")
endif(NOT @DUNE_MOD_NAME@_FOUND)
AC_PREREQ([2.62])
DUNE_AC_INIT
AC_CONFIG_SRCDIR([dune/grid/polygongrid.hh])
AM_CONFIG_HEADER([config.h])
DUNE_CHECK_ALL
AC_SUBST(AM_CPPFLAGS, $DUNE_CPPFLAGS)
AC_SUBST(AM_LDFLAGS, $DUNE_LDFLAGS)
LIBS="$DUNE_LIBS"
AC_CONFIG_FILES([
Makefile
cmake/Makefile
cmake/modules/Makefile
cmake/pkg/Makefile
dune/Makefile
dune/grid/Makefile
dune/grid/polygongrid/Makefile
dune/grid/test/Makefile
m4/Makefile
polygongrid/Makefile
dune-polygongrid.pc
])
AC_OUTPUT
DUNE_SUMMARY_ALL
if(NOT @DUNE_MOD_NAME@_FOUND)
#import the target
if(EXISTS "@CMAKE_BINARY_DIR@/@DUNE_MOD_NAME@-targets.cmake")
include("@CMAKE_BINARY_DIR@/@DUNE_MOD_NAME@-targets.cmake")
endif(EXISTS "@CMAKE_BINARY_DIR@/@DUNE_MOD_NAME@-targets.cmake")
#report other information
set(@DUNE_MOD_NAME@_PREFIX "@CMAKE_SOURCE_DIR@")
set(@DUNE_MOD_NAME@_INCLUDE_DIRS "@CMAKE_SOURCE_DIR@")
set(@DUNE_MOD_NAME@_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_DEBUG "@CMAKE_CXX_FLAGS_DEBUG@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_MINSIZEREL "@CMAKE_CXX_FLAGS_MINSIZEREL@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_RELEASE "@CMAKE_CXX_FLAGS_RELEASE@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_RELWITHDEBINFO "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@")
set(@DUNE_MOD_NAME@_LIBRARIES "")
set(@DUNE_MOD_NAME@_DEPENDS "@DUNE_DEPENDS@")
set(@DUNE_MOD_NAME@_SUGGESTS "@DUNE_SUGGESTS@")
set(@DUNE_MOD_NAME@_MODULE_PATH "@CMAKE_SOURCE_DIR@/cmake/modules")
endif(NOT @DUNE_MOD_NAME@_FOUND)
set(PACKAGE_VERSION "@DUNE_MOD_VERSION@")
if(NOT "${PACKAGE_FIND_VERSION}" VERSION_GREATER "@DUNE_MOD_VERSION@")
set (PACKAGE_VERSION_COMPATIBLE 1) # compatible with older
if ("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "@DUNE_MOD_VERSION@")
set(PACKAGE_VERSION_EXACT 1) #exact match for this version
endif()
endif()
Module: dune-polygongrid
Version: 2013.13
Version: 2015.13
Maintainer: nolte@mathematik.uni-freiburg.de
Depends: dune-grid (>= 2.3)
Depends: dune-grid (>= 3.0)
Whitespace-Hook: Yes
add_subdirectory(grid)
add_subdirectory( grid )
dunedir = $(includedir)/dune
SUBDIRS = grid
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules
install(FILES polygongrid.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/grid)
add_subdirectory( polygongrid )
add_subdirectory( test )
add_subdirectory(polygongrid)
add_subdirectory(test)
set( HEADERS
polygongrid.hh
)
install( FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/grid )
griddir = $(includedir)/dune/grid
grid_HEADERS = polygongrid.hh
SUBDIRS = polygongrid test
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules
install(FILES declaration.hh
entity.hh
grid.hh
indexset.hh
polytopegeometry.hh
object.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/grid/polygongrid)
set( HEADERS
declaration.hh
entity.hh
grid.hh
indexset.hh
object.hh
polytopegeometry.hh
)
install( FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/grid/polygongrid )
polygongriddir = $(includedir)/dune/grid/polygongrid
polygongrid_HEADERS = declaration.hh entity.hh grid.hh indexset.hh \
polytopegeometry.hh object.hh
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules
set(TESTS test-polygongrid)
add_directory_test_target( alltests )
foreach(_executable ${TESTS})
add_executable(${_executable} EXCLUDE_FROM_ALL ${_executable}.cc)
target_link_libraries(${_executable} ${DUNE_LIBS})
add_test(${_executable} ${_executable})
add_dune_mpi_flags(${_executable})
endforeach(_executable ${TESTS})
foreach( test test-polygontrid )
add_executable( ${test} EXCLUDE_FROM_ALL ${test}.cc)
target_link_dune_default_libraries( ${test} )
add_dune_mpi_flags( ${test} )
add_directory_test_target(test_target)
add_dependencies(${test_target} ${TESTS})
add_test( ${test} ${test} )
add_dependencies( ${alltests} ${test} )
endforeach()
TESTS = dune-polygongrid
check_PROGRAMS = $(TESTS)
test_polygongrid_SOURCES = test-polygongrid.cc
CLEANFILES = dgfparser.log
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules
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