Skip to content
Snippets Groups Projects
Commit d6be1103 authored by Markus Blatt's avatar Markus Blatt
Browse files

[Merge][CMake] Merged revisions : 6602

Revision  r6602
.----------------------
Cmake now installs headers, libs, m4 macros, shell scripts.

The documentation is still not built and therefore not installed

.----------------------


[[Imported from SVN: r7148]]
parents c0da7104 4121a7c8
No related branches found
No related tags found
No related merge requests found
......@@ -36,9 +36,9 @@ endif()
include(DuneStreams)
dune_set_minimal_debug_level()
# include dune-common to include pathtest
include_directories("${CMAKE_SOURCE_DIR}")
link_directories("${CMAKE_SOURCE_DIR}")
# include dune-common and current directory to include pathtest
include_directories("${CMAKE_SOURCE_DIR}" ".")
link_directories("${CMAKE_SOURCE_DIR}/lib")
# set required compiler flags for C++11 (former C++0x)
find_package(CXX11Features)
......@@ -51,6 +51,7 @@ check_include_file_cxx("memory" HAVE_MEMORY)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -DHAVE_MEMORY=${HAVE_MEMORY}")
# search for packages
find_package(PkgConfig)
find_package(MPI)
if(MPI_FOUND)
set(HAVE_MPI MPI_CXX_FOUND)
......@@ -78,9 +79,27 @@ add_definitions(-DHAVE_CONFIG_H)
# add subdirectories to execute CMakeLists.txt there
add_subdirectory("dune")
add_subdirectory("bin")
add_subdirectory("m4")
add_subdirectory("am")
add_subdirectory("doc")
set( CMAKE_FIND_LIBRARY_SUFFIXES ${_dune_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
configure_file(
${PROJECT_SOURCE_DIR}/${DUNE_MODULE_NAME}.pc.cmake
${PROJECT_BINARY_DIR}/${DUNE_MODULE_NAME}.pc
@ONLY
)
#install dune.module file
install(FILES dune.module DESTINATION lib/dunecontrol/${DUNE_MODULE_NAME})
# install pkgconfig file
if(PKG_CONFIG_FOUND )
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DUNE_MODULE_NAME}.pc
DESTINATION lib/pkgconfig)
endif(PKG_CONFIG_FOUND)
# set up CTest
enable_testing()
include(CTest)
......
install(PROGRAMS
checklog
documentation
doxygen
global-rules
headercheck
inkscape.am
latex
no-check-without-lib
sourcescheck
top-rules
webstuff
DESTINATION share/dune-common/am
)
install(PROGRAMS
dunedoxynize
duneproject
dunecontrol
mpi-config
dune-autogen
DESTINATION bin)
add_subdirectory("doxygen")
add_subdirectory("buildsystem")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/example.opts
DESTINATION share/doc/dune-common
)
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@/bin
libdir=@CMAKE_INSTALL_PREFIX@/lib
includedir=@CMAKE_INSTALL_PREFIX@/include
CXX=@CMAKE_CXX_COMPILER@
CC=@CMAKE_C_COMPILER@
DEPENDENCIES=@REQUIRES@
Name: @DUNE_MODULE_NAME@
Version: @DUNE_VERSION_STRING@
Description: Dune (Distributed and Unified Numerics Environment) common module
URL: http://dune-project.org/
Requires: ${DEPENDENCIES}
Libs: -L${libdir} -ldunecommon
Cflags: -I${includedir}
add_subdirectory("parallel")
add_subdirectory("test")
#build the library dunecommon
add_library("dunecommon"
exceptions.cc
fmatrixev.cc
......@@ -9,4 +10,74 @@ add_library("dunecommon"
parametertreeparser.cc
path.cc
stdstreams.cc)
# build the library in lib
set_target_properties(dunecommon PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
#install headers
install(FILES
alignment.hh
array.hh
arraylist.hh
bartonnackmanifcheck.hh
bigunsignedint.hh
binaryfunctions.hh
bitsetvector.hh
classname.hh
collectivecommunication.hh
debugstream.hh
deprecated.hh
densematrix.hh
densevector.hh
documentation.hh
dynmatrix.hh
dynvector.hh
enumset.hh
exceptions.hh
fassign.hh
finitestack.hh
float_cmp.cc
float_cmp.hh
fmatrix.hh
fmatrixev.hh
forloop.hh
ftraits.hh
function.hh
fvector.hh
gcd.hh
genericiterator.hh
geometrytype.hh
geometrytypeindex.hh
gmpfield.hh
indent.hh
interfaces.hh
ios_state.hh
iteratorfacades.hh
lcm.hh
lru.hh
math.hh
matvectraits.hh
misc.hh
mpicollectivecommunication.hh
mpiguard.hh
mpihelper.hh
mpitraits.hh
nullptr.hh
parametertree.hh
parametertreeparser.hh
path.hh
poolallocator.hh
precision.hh
propertymap.hh
reservedvector.hh
shared_ptr.hh
singleton.hh
sllist.hh
static_assert.hh
stdstreams.hh
timer.hh
tuples.hh
tupleutility.hh
typetraits.hh
unused.hh
version.hh
DESTINATION include/dune/common)
add_subdirectory("test")
#install headers
install(FILES
communicator.hh
indexset.hh
indicessyncer.hh
interface.hh
localindex.hh
plocalindex.hh
remoteindices.hh
selection.hh
DESTINATION include/dune/common/parallel)
# Install some test headers, because they get used by tests in other modules
install(FILES iteratortest.hh DESTINATION include/dune/common/test)
add_executable("arraylisttest" arraylisttest.cc)
add_executable("arraytest" arraytest.cc)
......
if (DUNE_USE_ONLY_STATIC_LIBS)
install(TARGETS dunecommon ARCHIVE DESTINATION lib)
else(DUNE_USE_ONLY_STATIC_LIBS)
install(TARGETS dunecommon LIBRARY DESTINATION lib)
endif(DUNE_USE_ONLY_STATIC_LIB)
install(PROGRAMS
acx_blas.m4
acx_lapack.m4
acx_mpi.m4
acx_pthread.m4
ax_boost_base.m4
ax_check_gl.m4
ax_lang_compiler_ms.m4
boost_fusion.m4
cxx0x_compiler.m4
cxx0x_rvaluereference.m4
cxx0x_nullptr.m4
cxx0x_static_assert.m4
cxx0x_variadic.m4
cxx0x_variadic_constructor_sfinae.m4
dune.m4
dune_all.m4
dune_autobuild.m4
dune_boost_base.m4
dune_check_lib.m4
dune_common.m4
dune_compiler.m4
dune_fortran.m4
dune_deprecated.m4
dune_deprecated_cppflags.m4
dune_docu.m4
dune_fieldvector_size_is_method.m4
dune_linkcxx.m4
dune_mpi.m4
dune_streams.m4
dune_tr1_headers.m4
dune_unused.m4
fortran_overwrite.m4
gmp.m4
hdf5.m4
immdx_lib_metis.m4
inkscape.m4
libtoolcompat.m4
make_shared.m4
mpi-config.m4
opengl.m4
parmetis.m4
shared_ptr.m4
xdr.m4
DESTINATION share/aclocal
)
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