From: turcksin Date: Tue, 3 Dec 2013 21:43:41 +0000 (+0000) Subject: Modify cmake to link against paralution. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99492bdf255d2042c9ff97dd1d4c21fda2e90ece;p=dealii-svn.git Modify cmake to link against paralution. git-svn-id: https://svn.dealii.org/branches/branch_paralution@31864 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/config/CMakeLists.txt b/deal.II/cmake/config/CMakeLists.txt index d6b3bb2a89..5db0528369 100644 --- a/deal.II/cmake/config/CMakeLists.txt +++ b/deal.II/cmake/config/CMakeLists.txt @@ -339,6 +339,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES) COND_SET_TO_YES(DEAL_II_WITH_UMFPACK MAKEFILE_UMFPACK) COND_SET_TO_YES(DEAL_II_WITH_P4EST MAKEFILE_P4EST) COND_SET_TO_YES(DEAL_II_WITH_MPI MAKEFILE_MPI) + COND_SET_TO_YES(DEAL_II_WITH_PARALUTION MAKEFILE_PARALUTION) # # For binary dir: diff --git a/deal.II/cmake/config/Make.global_options.in b/deal.II/cmake/config/Make.global_options.in index 832a9237b1..f2898b971e 100644 --- a/deal.II/cmake/config/Make.global_options.in +++ b/deal.II/cmake/config/Make.global_options.in @@ -51,18 +51,19 @@ DEAL_II_MINOR = @DEAL_II_VERSION_MINOR@ PERL = perl -USE_CONTRIB_PETSC = @MAKEFILE_PETSC@ -USE_CONTRIB_SLEPC = @MAKEFILE_SLEPC@ -USE_CONTRIB_TRILINOS = @MAKEFILE_TRILINOS@ -USE_CONTRIB_HDF5 = @MAKEFILE_HDF5@ -USE_CONTRIB_BLAS = @MAKEFILE_BLAS@ -USE_CONTRIB_LAPACK = @MAKEFILE_LAPACK@ -USE_CONTRIB_MUMPS = @MAKEFILE_MUMPS@ -USE_CONTRIB_ARPACK = @MAKEFILE_ARPACK@ -USE_CONTRIB_METIS = @MAKEFILE_METIS@ -USE_CONTRIB_UMFPACK = @MAKEFILE_UMFPACK@ -USE_CONTRIB_P4EST = @MAKEFILE_P4EST@ -DEAL_II_USE_MPI = @MAKEFILE_MPI@ +USE_CONTRIB_PETSC = @MAKEFILE_PETSC@ +USE_CONTRIB_SLEPC = @MAKEFILE_SLEPC@ +USE_CONTRIB_TRILINOS = @MAKEFILE_TRILINOS@ +USE_CONTRIB_HDF5 = @MAKEFILE_HDF5@ +USE_CONTRIB_BLAS = @MAKEFILE_BLAS@ +USE_CONTRIB_LAPACK = @MAKEFILE_LAPACK@ +USE_CONTRIB_MUMPS = @MAKEFILE_MUMPS@ +USE_CONTRIB_ARPACK = @MAKEFILE_ARPACK@ +USE_CONTRIB_METIS = @MAKEFILE_METIS@ +USE_CONTRIB_UMFPACK = @MAKEFILE_UMFPACK@ +USE_CONTRIB_P4EST = @MAKEFILE_P4EST@ +USE_CONTRIB_PARALUTION = @MAKEFILE_PARALUTION@ +DEAL_II_USE_MPI = @MAKEFILE_MPI@ OBJEXT = o EXEEXT = diff --git a/deal.II/cmake/configure/configure_2_paralution.cmake b/deal.II/cmake/configure/configure_2_paralution.cmake new file mode 100644 index 0000000000..7d5b7c7019 --- /dev/null +++ b/deal.II/cmake/configure/configure_2_paralution.cmake @@ -0,0 +1,27 @@ +## --------------------------------------------------------------------- +## $Id: configure_2_paralution.cmake 31527 2013-11-03 09:58:45Z maier $ +## +## Copyright (C) 2013 by the deal.II authors +## +## This file is part of the deal.II library. +## +## The deal.II library is free software; you can use it, redistribute +## it, and/or modify it under the terms of the GNU Lesser General +## Public License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## The full text of the license can be found in the file LICENSE at +## the top level of the deal.II distribution. +## +## --------------------------------------------------------------------- + +# +# Configuration for the paralution library: +# + +# +# The user has to know the location of the PARALUTION headers as well: +# +SET(PARALUTION_ADD_TO_USER_INCLUDE_DIRS TRUE) + + +CONFIGURE_FEATURE(PARALUTION) diff --git a/deal.II/cmake/modules/FindPARALUTION.cmake b/deal.II/cmake/modules/FindPARALUTION.cmake new file mode 100644 index 0000000000..078d6f9464 --- /dev/null +++ b/deal.II/cmake/modules/FindPARALUTION.cmake @@ -0,0 +1,74 @@ +## --------------------------------------------------------------------- +## $Id: FindPARALUTION.cmake 31527 2013-11-03 09:58:45Z maier $ +## +## Copyright (C) 2013 by the deal.II authors +## +## This file is part of the deal.II library. +## +## The deal.II library is free software; you can use it, redistribute +## it, and/or modify it under the terms of the GNU Lesser General +## Public License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## The full text of the license can be found in the file LICENSE at +## the top level of the deal.II distribution. +## +## --------------------------------------------------------------------- + +# +# Try to find the PARALUTION library +# +# This module exports +# +# PARALUTION_INCLUDE_DIRS +# PARALUTION_LIBRARIES +# PARALUTION_LINKER_FLAGS +# + +SET_IF_EMPTY(PARALUTION_DIR "$ENV{PARALUTION_DIR}") + +INCLUDE(FindPackageHandleStandardArgs) + + +FIND_PATH(PARALUTION_INCLUDE_DIR paralution.hpp + HINTS + ${PARALUTION_DIR} + PATH_SUFFIXES + inc + ) + +FIND_LIBRARY(PARALUTION_LIBRARY + NAMES paralution + HINTS + ${PARALUTION_DIR} + PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib + ) + +SET(_output ${PARALUTION_LIBRARY}) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PARALUTION DEFAULT_MSG + _output # Cosmetic: Gives nice output + PARALUTION_LIBRARY + PARALUTION_INCLUDE_DIR + ) + +MARK_AS_ADVANCED( + PARALUTION_LIBRARY + PARALUTION_INCLUDE_DIR + ) + +IF(PARALUTION_FOUND) + SET(PARALUTION_INCLUDE_DIRS + ${PARALUTION_INCLUDE_DIR} + ) + SET(PARALUTION_LIBRARIES + ${PARALUTION_LIBRARY} + ) + SET(PARALUTION_LINKER_FLAGS + ${PARALUTION_LINKER_FLAGS} + ) + + MARK_AS_ADVANCED(PARALUTION_DIR) +ELSE() + SET(PARALUTION_DIR "" CACHE PATH + "An optional hint to a paralution directory" + ) +ENDIF() diff --git a/deal.II/cmake/scripts/report_features.cc.in b/deal.II/cmake/scripts/report_features.cc.in index 457d226e04..0a91907e04 100644 --- a/deal.II/cmake/scripts/report_features.cc.in +++ b/deal.II/cmake/scripts/report_features.cc.in @@ -47,6 +47,10 @@ extern "C" { # include #endif +#ifdef DEAL_II_WITH_PARALUTION +# include +#endif + // Output configuration options from config.h. // The format of each line is // @@ -172,4 +176,8 @@ std::cout << "dealii-feature: BOOST=" #ifdef DEAL_II_WITH_64BIT_INDICES std::cout << "dealii-feature: 64bit_indices=yes" <