]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Modify cmake to link against paralution.
authorturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Dec 2013 21:43:41 +0000 (21:43 +0000)
committerturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Dec 2013 21:43:41 +0000 (21:43 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_paralution@31864 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/config/CMakeLists.txt
deal.II/cmake/config/Make.global_options.in
deal.II/cmake/configure/configure_2_paralution.cmake [new file with mode: 0644]
deal.II/cmake/modules/FindPARALUTION.cmake [new file with mode: 0644]
deal.II/cmake/scripts/report_features.cc.in
deal.II/cmake/scripts/run_testsuite.cmake

index d6b3bb2a8920fc1ee6d02327521deb0b3a78309d..5db05283690f6b7aa39f35074cddb8d7f75da838 100644 (file)
@@ -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:
index 832a9237b1d0acbb4c20f1910a993252cb311d63..f2898b971e1d0372d5640f5f00cd58c51f5ce685 100644 (file)
@@ -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 (file)
index 0000000..7d5b7c7
--- /dev/null
@@ -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 (file)
index 0000000..078d6f9
--- /dev/null
@@ -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()
index 457d226e04b8b62faa63922a4455f5d58ba0bd3f..0a91907e04ff2179325276bada779188efecf2ff 100644 (file)
@@ -47,6 +47,10 @@ extern "C" {
 #  include <slepcversion.h>
 #endif
 
+#ifdef DEAL_II_WITH_PARALUTION
+#  include <paralution.hpp>
+#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" <<std::endl;
 #endif  
+
+#ifdef DEAL_II_WITH_PARALUTION
+  std::cout << "dealii-feature: Paralution=yes" <<std::endl;
+#endif
 }
index 6eb07138209a6f27f1b375daacccfde4e7d08bc0..c9effd022970ec034f19ad1b971e5efa48bba7c7 100644 (file)
@@ -276,7 +276,7 @@ FOREACH(_var ${_variables})
       _var MATCHES "^(COMPAT_FILES|DOCUMENTATION|EXAMPLES|MESH_CONVERTER|PARAMETER_GUI)" OR
       _var MATCHES "^(ARPACK|BOOST|FUNCTIONPARSER|HDF5|METIS|MPI|MUMPS)_" OR
       _var MATCHES "^(NETCDF|P4EST|PETSC|SLEPC|THREADS|TBB|TRILINOS)_" OR
-      _var MATCHES "^(UMFPACK|ZLIB|LAPACK)_" OR
+      _var MATCHES "^(UMFPACK|ZLIB|LAPACK|PARALUTION)_" OR
       _var MATCHES "^(CMAKE|DEAL_II)_(C|CXX|Fortran|BUILD)_(COMPILER|FLAGS)" OR
       _var MATCHES "^CMAKE_BUILD_TYPE$" OR
       _var MATCHES "MAKEOPTS" OR

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.