From: heltai
Date: Sun, 18 Aug 2013 16:48:15 +0000 (+0000)
Subject: merged from trunk
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3cf012f784c1d15cd2b6c31955fb8905ccc8516d;p=dealii-svn.git
merged from trunk
git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@30335 0785d39b-7218-0410-832d-ea1e28bc413d
---
diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt
index 04dba539c6..714613a8c7 100644
--- a/deal.II/CMakeLists.txt
+++ b/deal.II/CMakeLists.txt
@@ -49,7 +49,7 @@ FOREACH(_file ${_macro_files})
ENDFOREACH()
#
-# Check whether the doc and bundled folders are available:
+# Check for the existence of various optional folders:
#
IF(EXISTS ${CMAKE_SOURCE_DIR}/bundled/CMakeLists.txt)
SET(DEAL_II_HAVE_BUNDLED_DIRECTORY TRUE)
@@ -59,6 +59,14 @@ IF(EXISTS ${CMAKE_SOURCE_DIR}/doc/CMakeLists.txt)
SET(DEAL_II_HAVE_DOC_DIRECTORY TRUE)
ENDIF()
+IF(NOT DEFINED TEST_DIR)
+ GET_FILENAME_COMPONENT(TEST_DIR "${CMAKE_SOURCE_DIR}" PATH)
+ SET(TEST_DIR "${TEST_DIR}/tests")
+ENDIF()
+IF(EXISTS ${TEST_DIR}/CMakeLists.txt)
+ SET(DEAL_II_HAVE_TESTS_DIRECTORY TRUE)
+ENDIF()
+
#
# We have to initialize some cached variables before PROJECT is called, so
# do it at this point:
@@ -72,6 +80,8 @@ PROJECT(deal.II CXX)
ENABLE_LANGUAGE_OPTIONAL(C)
ENABLE_LANGUAGE_OPTIONAL(Fortran)
+INCLUDE(setup_post_project_call)
+
INCLUDE(setup_deal_ii)
INCLUDE(setup_compiler_flags)
@@ -135,6 +145,10 @@ ADD_SUBDIRECTORY(cmake/config) # has to be included after source
ADD_SUBDIRECTORY(contrib) # has to be included after source
ADD_SUBDIRECTORY(examples)
+IF(DEAL_II_HAVE_TESTS_DIRECTORY)
+ ADD_SUBDIRECTORY(${TEST_DIR} ${CMAKE_BINARY_DIR}/tests)
+ENDIF()
+
#
# And finally, print the configuration:
#
diff --git a/deal.II/bundled/CMakeLists.txt b/deal.II/bundled/CMakeLists.txt
index 1e0d8a1e9b..846b614f2a 100644
--- a/deal.II/bundled/CMakeLists.txt
+++ b/deal.II/bundled/CMakeLists.txt
@@ -68,9 +68,10 @@ ENDIF()
#
# Threading Building Blocks library
#
-IF(NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
+IF(NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN"
+ AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
#
- # Cygwin is unsupported by tbb
+ # Cygwin is unsupported by tbb, Windows due to the way we compile tbb...
#
SET(FEATURE_THREADS_HAVE_BUNDLED TRUE)
OPTION(DEAL_II_FORCE_BUNDLED_THREADS
diff --git a/deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp b/deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp
index 3e2357b8e8..2e7be17839 100644
--- a/deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp
+++ b/deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp
@@ -18,14 +18,6 @@
#include
#include
-#if !defined(BOOST_INTEL_STDCXX0X)
-namespace std
-{
- template class shared_ptr;
- template class weak_ptr;
-}
-#endif
-
namespace boost
{
template class shared_ptr;
@@ -39,10 +31,20 @@ namespace boost
{
typedef boost::shared_ptr shared_type;
};
+
+// Workaround for a bug in boost:
+// https://svn.boost.org/trac/boost/ticket/6655
+//
+// It should be safe to depend on DEAL macros at this point as this header
+// should only be used by deal.II and dependent projects...
+//
+// - Maier, 2013
+#ifdef DEAL_II_CAN_USE_CXX11
template struct weak_ptr_traits >
{
typedef std::shared_ptr shared_type;
};
+#endif
template struct shared_ptr_traits
{};
@@ -51,10 +53,13 @@ namespace boost
{
typedef boost::weak_ptr weak_type;
};
+// as above
+#ifdef DEAL_II_CAN_USE_CXX11
template struct shared_ptr_traits >
{
typedef std::weak_ptr weak_type;
};
+#endif
namespace detail
{
diff --git a/deal.II/cmake/checks/check_01_cpu_features.cmake b/deal.II/cmake/checks/check_01_cpu_features.cmake
index d8c275b578..9639b89497 100644
--- a/deal.II/cmake/checks/check_01_cpu_features.cmake
+++ b/deal.II/cmake/checks/check_01_cpu_features.cmake
@@ -41,23 +41,19 @@
#
IF(CMAKE_C_COMPILER_WORKS)
INCLUDE(TestBigEndian)
+
+ CLEAR_CMAKE_REQUIRED()
TEST_BIG_ENDIAN(DEAL_II_WORDS_BIGENDIAN)
+ RESET_CMAKE_REQUIRED()
ELSE()
MESSAGE(STATUS
"No suitable C compiler was found! Assuming little endian platform."
)
+ SET(DEAL_II_WORDS_BIGENDIAN "0")
ENDIF()
IF(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
-
- #
- # These tests depend on certain cpu instruction sets being enabled, so
- # use the user supplied compiler flags for the tests as well:
- #
- SET(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS_SAVED}")
-
-
#
# Take care that the following tests are rerun if CMAKE_REQUIRED_FLAGS
# changes..
@@ -143,10 +139,9 @@ IF(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
}
"
DEAL_II_HAVE_AVX)
-
- SET(CMAKE_REQUIRED_FLAGS "")
ENDIF()
+
IF(DEAL_II_HAVE_SSE2)
IF(DEAL_II_HAVE_AVX)
SET(DEAL_II_COMPILER_VECTORIZATION_LEVEL 2)
@@ -156,4 +151,3 @@ IF(DEAL_II_HAVE_SSE2)
ELSE()
SET(DEAL_II_COMPILER_VECTORIZATION_LEVEL 0)
ENDIF()
-
diff --git a/deal.II/cmake/checks/check_02_system_features.cmake b/deal.II/cmake/checks/check_02_system_features.cmake
index 25d54167f5..22e6a8a88b 100644
--- a/deal.II/cmake/checks/check_02_system_features.cmake
+++ b/deal.II/cmake/checks/check_02_system_features.cmake
@@ -68,9 +68,9 @@ SWITCH_LIBRARY_PREFERENCE()
MARK_AS_ADVANCED(m_LIBRARY)
IF(NOT m_LIBRARY MATCHES "-NOTFOUND")
- SET(CMAKE_REQUIRED_LIBRARIES ${m_LIBRARY})
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${m_LIBRARY})
CHECK_CXX_SYMBOL_EXISTS("jn" "math.h" HAVE_JN)
- SET(CMAKE_REQUIRED_LIBRARIES)
+ RESET_CMAKE_REQUIRED()
IF(HAVE_JN)
LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${m_LIBRARY})
ENDIF()
@@ -116,12 +116,32 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
SET(DEAL_II_MSVC TRUE)
#
- # Disable shared libraries on native Windows targets for the moment.
+ # Shared library handling:
#
- MESSAGE(WARNING "\n"
- "BUILD_SHARED_LIBS forced to OFF\n\n"
- )
- SET(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
+ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ #
+ # With MinGW we're lucky:
+ #
+ ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--export-all-symbols")
+ ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--enable-auto-import")
+ ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--allow-multiple-definition")
+
+ #
+ # Workaround for a miscompilation and linkage issue with shared libraries
+ # with MinGW. Replacing -O0 with -O1 seems to help..
+ #
+ REPLACE_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-O0" "-O1")
+
+ ELSE()
+
+ #
+ # Otherwise disable shared libraries:
+ #
+ MESSAGE(WARNING "\n"
+ "BUILD_SHARED_LIBS forced to OFF\n\n"
+ )
+ SET(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
+ ENDIF()
#
# Disable -ggdb and -g on Windows/MinGW targets for the moment until the
@@ -135,6 +155,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
STRIP_FLAG(DEAL_II_LINKER_FLAGS_DEBUG "-g")
ENDIF()
+
IF(CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
#
# Workaround for a miscompilation and linkage issue with shared libraries
@@ -143,5 +164,4 @@ IF(CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
# - Matthias Maier, 2013
#
REPLACE_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-O0" "-O1")
-
ENDIF()
diff --git a/deal.II/cmake/checks/check_03_compiler_bugs.cmake b/deal.II/cmake/checks/check_03_compiler_bugs.cmake
index cf49fb0e57..bb63ba0740 100644
--- a/deal.II/cmake/checks/check_03_compiler_bugs.cmake
+++ b/deal.II/cmake/checks/check_03_compiler_bugs.cmake
@@ -21,43 +21,6 @@
########################################################################
-#
-# Some compiler versions, notably ICC, have trouble with the
-# following code in which we explicitly call a destructor.
-# This has to be worked around with a typedef. The problem is
-# that the workaround fails with some other compilers, so that
-# we can not unconditionally use the workaround...
-#
-# - Wolfgang Bangerth, Matthias Maier, rewritten 2012
-#
-CHECK_CXX_COMPILER_BUG(
- "
- namespace dealii
- {
- namespace FEValuesViews
- {
- template struct Scalar {};
- }
-
- template
- struct X
- {
- FEValuesViews::Scalar scalars[dim*spacedim];
-
- void f()
- {
- scalars[0].dealii::FEValuesViews::Scalar::~Scalar ();
- }
- };
-
- template struct X<2,2>;
- }
- int main() { return 0; }
- "
- DEAL_II_EXPLICIT_DESTRUCTOR_BUG
- )
-
-
#
# On some gcc 4.3 snapshots, a 'const' qualifier on a return type triggers a
# warning. This is unfortunate, since we happen to stumble on this
diff --git a/deal.II/cmake/config/CMakeLists.txt b/deal.II/cmake/config/CMakeLists.txt
index 037af96e8c..071ba6110b 100644
--- a/deal.II/cmake/config/CMakeLists.txt
+++ b/deal.II/cmake/config/CMakeLists.txt
@@ -81,7 +81,7 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES})
)
LIST(APPEND CONFIG_LIBRARIES
${_keyword}
- ${CONFIG_LIBRARIES_${_build}}
+ \${DEAL_II_LIBRARIES_${_build}}
)
SET(CONFIG_TARGET_${_build}
@@ -89,7 +89,7 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES})
)
LIST(APPEND CONFIG_TARGET
${_keyword}
- ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}
+ \${DEAL_II_TARGET_${_build}}
)
ENDFOREACH()
diff --git a/deal.II/cmake/config/Make.global_options.in b/deal.II/cmake/config/Make.global_options.in
index bcedebb257..a32109a464 100644
--- a/deal.II/cmake/config/Make.global_options.in
+++ b/deal.II/cmake/config/Make.global_options.in
@@ -1,22 +1,28 @@
-# $Id$
-
-#
-# Compatibility Make.global_options file
-#
-
-###############################################################################
-## Please note:
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
-## This is a compatibility Make.global_options file generated by CMake
-## from the ./cmake/config/Make.global_options.in file.
+## 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.
+##
+## ---------------------------------------------------------------------
#
-# the following lines will be replaced by cmake
+# Please note:
+#
+# This is a compatibility Make.global_options file generated by CMake
+# from the ./cmake/config/Make.global_options.in file.
#
+
D = @CMAKE_INSTALL_PREFIX@
CXX = @CMAKE_CXX_COMPILER@
CXX-ID = @CMAKE_CXX_COMPILER_ID@
@@ -62,15 +68,12 @@ EXEEXT =
# set paths to all the libraries we need:
-lib-deal2.o = ${MAKEFILE_TARGETS_RELEASE}
-lib-deal2.g = ${MAKEFILE_TARGETS_DEBUG}
+lib-deal2.o = @MAKEFILE_TARGETS_RELEASE@
+lib-deal2.g = @MAKEFILE_TARGETS_DEBUG@
-# include paths as command line flags. while compilers allow a space between
-# the '-I' and the actual path, we also send these flags to the
-# make_dependencies program that doesn't support the extra space.
-#
-INCLUDE = ${MAKEFILE_INCLUDE_DIRS}
+# Include paths as command line flags
+INCLUDE = @MAKEFILE_INCLUDE_DIRS@
# compiler flags for debug and optimized mode
diff --git a/deal.II/cmake/configure/configure_1_lapack.cmake b/deal.II/cmake/configure/configure_1_lapack.cmake
index a319fe155b..455a4944b4 100644
--- a/deal.II/cmake/configure/configure_1_lapack.cmake
+++ b/deal.II/cmake/configure/configure_1_lapack.cmake
@@ -19,64 +19,9 @@
#
MACRO(FEATURE_LAPACK_FIND_EXTERNAL var)
- FIND_PACKAGE(LAPACK)
-
- #
- # So, well... LAPACK_LINKER_FLAGS and LAPACK_LIBRARIES should contain the
- # complete link interface. But for invalid user overrides we include
- # BLAS_LIBRARIES and BLAS_LINKER_FLAGS as well..
- #
- IF(NOT LAPACK_LINKER_FLAGS MATCHES "${BLAS_LINKER_FLAGS}")
- MESSAGE(STATUS
- "Manually adding BLAS_LINKER_FLAGS to LAPACK_LINKER_FLAGS"
- )
- ADD_FLAGS(LAPACK_LINKER_FLAGS "${BLAS_LINKER_FLAGS}")
- ENDIF()
- IF(NOT "${LAPACK_LIBRARIES}" MATCHES "${BLAS_LIBRARIES}")
- MESSAGE(STATUS
- "Manually adding BLAS_LIBRARIES to LAPACK_LIBRARIES"
- )
- LIST(APPEND LAPACK_LIBRARIES ${BLAS_LIBRARIES})
- ENDIF()
-
- MARK_AS_ADVANCED(
- atlas_LIBRARY
- blas_LIBRARY
- gslcblas_LIBRARY
- lapack_LIBRARY
- m_LIBRARY
- ptf77blas_LIBRARY
- ptlapack_LIBRARY
- refblas_LIBRARY
- reflapack_LIBRARY
- )
+ FIND_PACKAGE(DEALII_LAPACK)
IF(LAPACK_FOUND)
- #
- # Well, in case of static archives we have to manually pick up the
- # complete link interface. *sigh*
- #
- # Do this unconditionally for the most common case:
- # TODO: Non-GNU setups...
- #
- #
- # Switch the library preference back to prefer dynamic libraries if
- # DEAL_II_PREFER_STATIC_LIBS=TRUE but DEAL_II_STATIC_EXECUTABLE=FALSE. In
- # this case system libraries should be linked dynamically.
- #
- SWITCH_LIBRARY_PREFERENCE()
- FOREACH(_lib gfortran m quadmath)
- FIND_LIBRARY(${_lib}_LIBRARY
- NAMES ${_lib}
- HINTS ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
- MARK_AS_ADVANCED(${_lib}_LIBRARY)
-
- IF(NOT ${_lib}_LIBRARY MATCHES "-NOTFOUND")
- LIST(APPEND LAPACK_LIBRARIES ${${_lib}_LIBRARY})
- ENDIF()
- ENDFOREACH()
- SWITCH_LIBRARY_PREFERENCE()
-
SET(${var} TRUE)
ENDIF()
ENDMACRO()
@@ -97,8 +42,12 @@ SET(DEAL_II_LAPACK_FUNCTIONS
)
MACRO(CHECK_FOR_LAPACK_FUNCTIONS)
+ #
+ # Clear the test flags because the following test will use a C compiler
+ #
+ CLEAR_CMAKE_REQUIRED()
+ SET(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
SET(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES})
- ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
#
# Push -pthread as well:
#
@@ -118,9 +67,7 @@ MACRO(CHECK_FOR_LAPACK_FUNCTIONS)
ENDFOREACH()
ENDIF()
- SET(CMAKE_REQUIRED_LIBRARIES)
- STRIP_FLAG(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
- STRIP_FLAG(CMAKE_REQUIRED_FLAGS "-pthread")
+ RESET_CMAKE_REQUIRED()
ENDMACRO()
diff --git a/deal.II/cmake/configure/configure_1_mpi.cmake b/deal.II/cmake/configure/configure_1_mpi.cmake
index 85de2a41c2..2eb6bd3847 100644
--- a/deal.II/cmake/configure/configure_1_mpi.cmake
+++ b/deal.II/cmake/configure/configure_1_mpi.cmake
@@ -107,10 +107,15 @@ MACRO(FEATURE_MPI_ERROR_MESSAGE)
MESSAGE(FATAL_ERROR "\n"
"Could not find any suitable mpi library!\n"
"Please ensure that an mpi library is installed on your computer\n"
- "and set CMAKE_CXX_COMPILER and CMAKE_C_COMPILER to the appropriate mpi\n"
- "wrappers:\n"
- " $ CC=\".../mpicc\" CXX=\".../mpicxx\" cmake <...>\n"
- " $ cmake -DCMAKE_C_COMPILER=\".../mpicc\" -DCMAKE_CXX_COMPIER=\".../mpicxx\" <...>\n"
+ "and set CMAKE_CXX_COMPILER to the appropriate mpi wrappers:\n"
+ " $ CXX=\".../mpicxx\" cmake <...>\n"
+ " $ cmake -DCMAKE_CXX_COMPILER=\".../mpicxx\" <...>\n"
+ "Or with additional C and Fortran wrappers (recommended!):\n"
+ " $ CC=\".../mpicc\" CXX=\".../mpicxx\" F90=\".../mpif90\" cmake <...>\n"
+ " $ cmake -DCMAKE_C_COMPILER=\".../mpicc\"\\\n"
+ " -DCMAKE_CXX_COMPILER=\".../mpicxx\"\\\n"
+ " -DCMAKE_Fortran_COMPILER=\".../mpif90\"\\\n"
+ " <...>\n"
)
ENDMACRO()
diff --git a/deal.II/cmake/configure/configure_1_threads.cmake b/deal.II/cmake/configure/configure_1_threads.cmake
index 8525ad770e..d43fd3ea49 100644
--- a/deal.II/cmake/configure/configure_1_threads.cmake
+++ b/deal.II/cmake/configure/configure_1_threads.cmake
@@ -36,7 +36,15 @@ MACRO(SETUP_THREADING)
# this case system libraries should be linked dynamically.
#
SWITCH_LIBRARY_PREFERENCE()
+
+ #
+ # Clear the test flags because FindThreads.cmake will use a C compiler:
+ #
+ CLEAR_CMAKE_REQUIRED()
+
FIND_PACKAGE(Threads)
+
+ RESET_CMAKE_REQUIRED()
SWITCH_LIBRARY_PREFERENCE()
ELSE()
@@ -112,7 +120,7 @@ MACRO(SETUP_THREADING)
}
"
DEAL_II_HAVE_MT_POSIX_BARRIERS)
- STRIP_FLAG(CMAKE_REQUIRED_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
+ RESET_CMAKE_REQUIRED()
IF(NOT DEAL_II_HAVE_MT_POSIX_BARRIERS)
SET(DEAL_II_USE_MT_POSIX_NO_BARRIERS TRUE)
ENDIF()
diff --git a/deal.II/cmake/configure/configure_2_metis.cmake b/deal.II/cmake/configure/configure_2_metis.cmake
index 92a1f10880..8d83b9661d 100644
--- a/deal.II/cmake/configure/configure_2_metis.cmake
+++ b/deal.II/cmake/configure/configure_2_metis.cmake
@@ -22,7 +22,7 @@ MACRO(FEATURE_METIS_FIND_EXTERNAL var)
FIND_PACKAGE(METIS)
IF(METIS_FOUND)
- IF(METIS_MAJOR GREATER 4)
+ IF(METIS_VERSION_MAJOR GREATER 4)
SET(${var} TRUE)
ELSE()
MESSAGE(STATUS "Insufficient metis installation found: "
diff --git a/deal.II/cmake/configure/configure_2_trilinos.cmake b/deal.II/cmake/configure/configure_2_trilinos.cmake
index 41a5f93bf5..3669492796 100644
--- a/deal.II/cmake/configure/configure_2_trilinos.cmake
+++ b/deal.II/cmake/configure/configure_2_trilinos.cmake
@@ -131,10 +131,10 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
"has to be configured to use the same number of bits as deal.II, but "
"found:\n"
" DEAL_II_WITH_64BIT_INDICES = ${DEAL_II_WITH_64BIT_INDICES}\n"
- " TRILINOS_WITH_NO_32BIT_INDICES = ${TRILINOS_WITH_NO_32_BIT_INDICES}\n"
+ " TRILINOS_WITH_NO_32BIT_INDICES = ${TRILINOS_WITH_NO_32_BIT_INDICES}\n"
)
SET(${var} FALSE)
- ENDIF()
+ ENDIF()
#
# Trilinos has to be configured with 64bit indices if deal.II uses unsigned long
@@ -143,74 +143,41 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
IF(TRILINOS_WITH_NO_64BIT_INDICES AND DEAL_II_WITH_64BIT_INDICES)
MESSAGE(STATUS "deal.II was configured to use 64bit global indices but "
"Trilinos was not."
- )
+ )
SET(TRILINOS_ADDITIONAL_ERROR_STRING
${TRILINOS_ADDITIONAL_ERROR_STRING}
"The Trilinos installation (found at \"${TRILINOS_DIR}\")\n"
"has to be configured to use the same number of bits as deal.II, but "
"found:\n"
" DEAL_II_WITH_64BIT_INDICES = ${DEAL_II_WITH_64BIT_INDICES}\n"
- " TRILINOS_WITH_NO_64BIT_INDICES = ${TRILINOS_WITH_NO_64_BIT_INDICES}\n"
+ " TRILINOS_WITH_NO_64BIT_INDICES = ${TRILINOS_WITH_NO_64_BIT_INDICES}\n"
)
SET(${var} FALSE)
- ENDIF()
-
+ ENDIF()
#
# Some versions of Sacado_cmath.hpp do things that aren't compatible
# with the -std=c++0x flag of GCC, see deal.II FAQ.
# Test whether that is indeed the case
#
- IF(${var})
- SET(CMAKE_REQUIRED_INCLUDES ${TRILINOS_INCLUDE_DIRS})
- PUSH_TEST_FLAG("${DEAL_II_CXX11_FLAG}")
-
- CHECK_CXX_SOURCE_COMPILES(
- "
- #include
- int main(){ return 0; }
- "
- TRILINOS_SUPPORTS_CPP11)
-
- IF(DEAL_II_CAN_USE_CXX11 AND NOT TRILINOS_SUPPORTS_CPP11)
- #
- # Try whether exporting HAS_C99_TR1_CMATH helps:
- #
- PUSH_TEST_FLAG("-DHAS_C99_TR1_CMATH")
- CHECK_CXX_SOURCE_COMPILES(
- "
- #include
- int main(){ return 0; }
- "
- TRILINOS_HAS_C99_TR1_WORKAROUND)
- POP_TEST_FLAG()
-
- IF(TRILINOS_HAS_C99_TR1_WORKAROUND)
- LIST(APPEND DEAL_II_DEFINITIONS "HAS_C99_TR1_CMATH")
- LIST(APPEND DEAL_II_USER_DEFINITIONS "HAS_C99_TR1_CMATH")
- ELSE()
- MESSAGE(STATUS "Could not find a sufficient Trilinos installation: "
- "The installation is not compatible with the C++ standard selected for "
- "this compiler."
- )
- SET(TRILINOS_ADDITIONAL_ERROR_STRING
- ${TRILINOS_ADDITIONAL_ERROR_STRING}
- "The Trilinos installation (found at \"${TRILINOS_DIR}\")\n"
- "is not compatible with the C++ standard selected for\n"
- "this compiler. See the deal.II FAQ page for a solution.\n\n"
- )
- SET(${var} FALSE)
- ENDIF()
- ENDIF()
+ IF(DEAL_II_CAN_USE_CXX11 AND NOT TRILINOS_SUPPORTS_CPP11)
- POP_TEST_FLAG()
- SET(CMAKE_REQUIRED_INCLUDES)
-
- #
- # Remove the following variables from the cache to force a recheck:
- #
- UNSET(TRILINOS_SUPPORTS_CPP11 CACHE)
- UNSET(TRILINOS_HAS_C99_TR1_WORKAROUND CACHE)
+ IF(TRILINOS_HAS_C99_TR1_WORKAROUND)
+ LIST(APPEND DEAL_II_DEFINITIONS "HAS_C99_TR1_CMATH")
+ LIST(APPEND DEAL_II_USER_DEFINITIONS "HAS_C99_TR1_CMATH")
+ ELSE()
+ MESSAGE(STATUS "Could not find a sufficient Trilinos installation: "
+ "The installation is not compatible with the C++ standard selected for "
+ "this compiler."
+ )
+ SET(TRILINOS_ADDITIONAL_ERROR_STRING
+ ${TRILINOS_ADDITIONAL_ERROR_STRING}
+ "The Trilinos installation (found at \"${TRILINOS_DIR}\")\n"
+ "is not compatible with the C++ standard selected for\n"
+ "this compiler. See the deal.II FAQ page for a solution.\n\n"
+ )
+ SET(${var} FALSE)
+ ENDIF()
ENDIF()
ENDIF(TRILINOS_FOUND)
@@ -218,13 +185,6 @@ ENDMACRO()
MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL)
- #
- # *Boy* Sanitize the include paths given by TrilinosConfig.cmake...
- #
- STRING(REGEX REPLACE
- "(lib64|lib)\\/cmake\\/Trilinos\\/\\.\\.\\/\\.\\.\\/\\.\\.\\/" ""
- TRILINOS_INCLUDE_DIRS "${TRILINOS_INCLUDE_DIRS}"
- )
INCLUDE_DIRECTORIES(${TRILINOS_INCLUDE_DIRS})
diff --git a/deal.II/cmake/configure/configure_boost.cmake b/deal.II/cmake/configure/configure_boost.cmake
index 7d017236b4..f2071971ea 100644
--- a/deal.II/cmake/configure/configure_boost.cmake
+++ b/deal.II/cmake/configure/configure_boost.cmake
@@ -38,6 +38,11 @@ SET(DEAL_II_WITH_BOOST ON # Always true. We need it :-]
MACRO(FEATURE_BOOST_FIND_EXTERNAL var)
+ SET_IF_EMPTY(BOOST_DIR "$ENV{BOOST_DIR}")
+ IF(NOT "${BOOST_DIR}" STREQUAL "")
+ SET(BOOST_ROOT "${BOOST_DIR}")
+ ENDIF()
+
IF(DEAL_II_WITH_THREADS)
SET(_boost_components serialization system thread)
ELSE()
@@ -65,11 +70,24 @@ MACRO(FEATURE_BOOST_FIND_EXTERNAL var)
MARK_AS_ADVANCED(Boost_DIR)
+ SET(BOOST_VERSION_MAJOR "${Boost_MAJOR_VERSION}")
+ SET(BOOST_VERSION_MINOR "${Boost_MINOR_VERSION}")
+ SET(BOOST_VERSION_SUBMINOR "${Boost_SUBMINOR_VERSION}")
+ SET(BOOST_VERSION
+ "${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_SUBMINOR}"
+ )
+
+
IF( Boost_SERIALIZATION_FOUND AND
Boost_SYSTEM_FOUND AND
(NOT DEAL_II_WITH_THREADS OR Boost_THREAD_FOUND)
)
+ MARK_AS_ADVANCED(BOOST_DIR)
SET(${var} TRUE)
+ ELSE()
+ SET(BOOST_DIR "" CACHE PATH
+ "An optional hint to a boost directory"
+ )
ENDIF()
ENDMACRO()
diff --git a/deal.II/cmake/configure/configure_slepc.cmake b/deal.II/cmake/configure/configure_slepc.cmake
index 269f85daa1..c0d1b212b0 100644
--- a/deal.II/cmake/configure/configure_slepc.cmake
+++ b/deal.II/cmake/configure/configure_slepc.cmake
@@ -25,9 +25,14 @@ MACRO(FEATURE_SLEPC_FIND_EXTERNAL var)
IF(SLEPC_FOUND)
#
- # Check whether SLEPc and PETSc are compatible.
+ # Check whether SLEPc and PETSc are compatible according to
+ # SLEPc's rules: This is equivalent to asking if the VERSION_MAJOR
+ # and VERSION_MINOR of PETSc and SLEPc are
+ # equivalent; and where VERSION_SUBMINORs are allowed to differ.
#
- IF("${SLEPC_VERSION}" STREQUAL "${PETSC_VERSION}")
+ IF( ("${SLEPC_VERSION_MAJOR}" STREQUAL "${PETSC_VERSION_MAJOR}")
+ AND
+ ("${SLEPC_VERSION_MINOR}" STREQUAL "${PETSC_VERSION_MINOR}"))
SET(${var} TRUE)
ELSE()
diff --git a/deal.II/cmake/macros/macro_clear_cmake_required.cmake b/deal.II/cmake/macros/macro_clear_cmake_required.cmake
new file mode 100644
index 0000000000..186004f5d0
--- /dev/null
+++ b/deal.II/cmake/macros/macro_clear_cmake_required.cmake
@@ -0,0 +1,29 @@
+## ---------------------------------------------------------------------
+## $Id$
+##
+## 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.
+##
+## ---------------------------------------------------------------------
+
+#
+# A small macro to clear the CMAKE_REQUIRED_* variables.
+#
+# Usage:
+# CLEAR_CMAKE_REQUIRED_FLAGS
+#
+
+MACRO(CLEAR_CMAKE_REQUIRED)
+ SET(CMAKE_REQUIRED_FLAGS)
+ SET(CMAKE_REQUIRED_INCLUDES)
+ SET(CMAKE_REQUIRED_LIBRARIES)
+ENDMACRO()
+
diff --git a/deal.II/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake b/deal.II/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake
index bcd842eb09..8f355ff1c9 100644
--- a/deal.II/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake
+++ b/deal.II/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake
@@ -51,9 +51,15 @@ MACRO(DEAL_II_INITIALIZE_CACHED_VARIABLES)
ENDIF()
#
- # Reset build type if unsupported:
+ # Reset build type if unsupported, i.e. if it is not (case insensitively
+ # equal to Debug or Release or unsupported by the current build type:
#
- IF(NOT DEAL_II_BUILD_TYPE MATCHES "${CMAKE_BUILD_TYPE}")
+ STRING(TOLOWER "${CMAKE_BUILD_TYPE}" _cmake_build_type)
+ STRING(TOLOWER "${DEAL_II_BUILD_TYPE}" _deal_ii_build_type)
+
+ IF( NOT "${_cmake_build_type}" MATCHES "^(debug|release)$"
+ OR NOT _deal_ii_build_type MATCHES "${_cmake_build_type}" )
+
IF("${DEAL_II_BUILD_TYPE}" STREQUAL "DebugRelease")
SET(_new_build_type "Debug")
ELSE()
diff --git a/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake b/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake
index e98bd25576..28b88dd1d0 100644
--- a/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake
+++ b/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake
@@ -61,16 +61,16 @@ MACRO(DEAL_II_SETUP_TARGET _target)
)
#
- # Append build type dependend flags and definitions.
+ # Append build type dependent flags and definitions.
#
#
# For this we obey the behaviour of the "optimized" and "debug"
# keywords and this is a bit tricky:
#
- # If the global property DEBUG_CONFIGURATIONS is set all build
- # types that (case insensitive) match one of the listed build types is
- # considered a "debug" build. The rest is "optimized".
+ # If the global property DEBUG_CONFIGURATIONS is set all build types that
+ # (case insensitively) match one of the listed build types is considered
+ # a "debug" build. The rest is "optimized".
#
# Otherwise every build type that (case insensitively) matches "debug" is
# considered a debug build.
@@ -97,7 +97,12 @@ MACRO(DEAL_II_SETUP_TARGET _target)
ENDIF()
ENDIF()
- IF(_on_debug_build)
+ #
+ # We can only append DEBUG link flags and compile definitions if deal.II
+ # was build with Debug or DebugRelease build type. So test for this:
+ #
+ IF( _on_debug_build
+ AND DEAL_II_BUILD_TYPE MATCHES "Debug" )
SET_PROPERTY(TARGET ${_target} APPEND_STRING PROPERTY
LINK_FLAGS " ${DEAL_II_LINKER_FLAGS_DEBUG}"
)
diff --git a/deal.II/cmake/macros/macro_enable_if_links.cmake b/deal.II/cmake/macros/macro_enable_if_links.cmake
index 0f4ef07e96..6c2bfeb6d1 100644
--- a/deal.II/cmake/macros/macro_enable_if_links.cmake
+++ b/deal.II/cmake/macros/macro_enable_if_links.cmake
@@ -30,7 +30,7 @@ MACRO(ENABLE_IF_LINKS _variable _flag)
STRING(REPLACE "," "" _flag_name "${_flag_name}")
STRING(REPLACE "--" "__" _flag_name "${_flag_name}")
SET(_backup ${CMAKE_REQUIRED_LIBRARIES})
- SET(CMAKE_REQUIRED_LIBRARIES "${_flag_stripped}")
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES "${_flag_stripped}")
CHECK_CXX_COMPILER_FLAG(
""
DEAL_II_HAVE_FLAG_${_flag_name}
diff --git a/deal.II/cmake/macros/macro_enable_language_optional.cmake b/deal.II/cmake/macros/macro_enable_language_optional.cmake
index 885b960f8c..fccb978ae4 100644
--- a/deal.II/cmake/macros/macro_enable_language_optional.cmake
+++ b/deal.II/cmake/macros/macro_enable_language_optional.cmake
@@ -32,10 +32,10 @@
#
MACRO(ENABLE_LANGUAGE_OPTIONAL _language)
- #
- # Run this check exactly once:
- #
IF(NOT ${_language}_CHECKED)
+ #
+ # Run this check exactly once:
+ #
SET(${_language}_CHECKED TRUE CACHE INTERNAL "" FORCE)
SET(_tmp ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/${_language}_test)
@@ -58,9 +58,17 @@ MACRO(ENABLE_LANGUAGE_OPTIONAL _language)
)
IF("${_result}" STREQUAL "0")
+ SET(DEAL_II_${_language}_COMPILER_WORKS TRUE CACHE INTERNAL "" FORCE)
ENABLE_LANGUAGE(${_language})
ELSE()
MESSAGE(STATUS "No working ${_language} compiler found, disabling ${_language}")
ENDIF()
+ ELSE()
+ #
+ # Enable the language depending on the cached result from a former run:
+ #
+ IF(DEAL_II_${_language}_COMPILER_WORKS)
+ ENABLE_LANGUAGE(${_language})
+ ENDIF()
ENDIF()
ENDMACRO()
diff --git a/deal.II/cmake/macros/macro_reset_cmake_required.cmake b/deal.II/cmake/macros/macro_reset_cmake_required.cmake
new file mode 100644
index 0000000000..0f2865a3d7
--- /dev/null
+++ b/deal.II/cmake/macros/macro_reset_cmake_required.cmake
@@ -0,0 +1,30 @@
+## ---------------------------------------------------------------------
+## $Id$
+##
+## 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.
+##
+## ---------------------------------------------------------------------
+
+#
+# A small macro to reset the CMAKE_REQUIRED_* variables to its default
+# values
+#
+# Usage:
+# RESET_CMAKE_REQUIRED_FLAGS
+#
+
+MACRO(RESET_CMAKE_REQUIRED)
+ SET(CMAKE_REQUIRED_FLAGS ${CMAKE_CXX_FLAGS_SAVED})
+ SET(CMAKE_REQUIRED_INCLUDES)
+ SET(CMAKE_REQUIRED_LIBRARIES)
+ENDMACRO()
+
diff --git a/deal.II/cmake/modules/FindARPACK.cmake b/deal.II/cmake/modules/FindARPACK.cmake
index 243899b9e0..f2bb51d628 100644
--- a/deal.II/cmake/modules/FindARPACK.cmake
+++ b/deal.II/cmake/modules/FindARPACK.cmake
@@ -34,7 +34,7 @@ SET_IF_EMPTY(ARPACK_DIR "$ENV{ARPACK_DIR}")
#
# ARPACK needs LAPACK and BLAS as dependencies:
#
-FIND_PACKAGE(LAPACK)
+FIND_PACKAGE(DEALII_LAPACK)
FIND_LIBRARY(ARPACK_LIBRARY
NAMES arpack
diff --git a/deal.II/cmake/modules/FindDEALII_LAPACK.cmake b/deal.II/cmake/modules/FindDEALII_LAPACK.cmake
new file mode 100644
index 0000000000..b1c7630265
--- /dev/null
+++ b/deal.II/cmake/modules/FindDEALII_LAPACK.cmake
@@ -0,0 +1,138 @@
+## ---------------------------------------------------------------------
+## $Id$
+##
+## 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.
+##
+## ---------------------------------------------------------------------
+
+#
+# This module is a wrapper around the FindLAPACK.cmake module provided by
+# CMake.
+#
+# This module exports
+#
+# LAPACK_FOUND
+# LAPACK_LIBRARIES
+# LAPACK_LINKER_FLAGS
+# BLAS_FOUND
+# BLAS_LIBRARIES
+# BLAS_LINKER_FLAGS
+# METIS_INCLUDE_DIRS
+#
+
+
+
+#
+# We have to use a trick with CMAKE_PREFIX_PATH to make LAPACK_DIR and
+# BLAS_DIR work...
+#
+SET_IF_EMPTY(BLAS_DIR "$ENV{BLAS_DIR}")
+SET_IF_EMPTY(LAPACK_DIR "$ENV{LAPACK_DIR}")
+
+SET(_cmake_prefix_path_backup "${CMAKE_PREFIX_PATH}")
+
+SET(CMAKE_PREFIX_PATH ${BLAS_DIR} ${LAPACK_DIR} ${_cmake_prefix_path_backup})
+
+FIND_PACKAGE(BLAS)
+
+SET(CMAKE_PREFIX_PATH ${LAPACK_DIR} ${_cmake_prefix_path_backup})
+
+FIND_PACKAGE(LAPACK)
+
+SET(CMAKE_PREFIX_PATH ${_cmake_prefix_path_backup})
+
+MARK_AS_ADVANCED(
+ atlas_LIBRARY
+ blas_LIBRARY
+ gslcblas_LIBRARY
+ lapack_LIBRARY
+ m_LIBRARY
+ ptf77blas_LIBRARY
+ ptlapack_LIBRARY
+ refblas_LIBRARY
+ reflapack_LIBRARY
+ )
+
+
+IF(LAPACK_FOUND)
+ SET(DEALII_LAPACK_FOUND TRUE)
+
+ #
+ # So, well... LAPACK_LINKER_FLAGS and LAPACK_LIBRARIES should contain the
+ # complete link interface. But for invalid user overrides we include
+ # BLAS_LIBRARIES and BLAS_LINKER_FLAGS as well..
+ #
+ IF(NOT LAPACK_LINKER_FLAGS MATCHES "${BLAS_LINKER_FLAGS}")
+ MESSAGE(STATUS
+ "Manually adding BLAS_LINKER_FLAGS to LAPACK_LINKER_FLAGS"
+ )
+ ADD_FLAGS(LAPACK_LINKER_FLAGS "${BLAS_LINKER_FLAGS}")
+ ENDIF()
+ IF(NOT "${LAPACK_LIBRARIES}" MATCHES "${BLAS_LIBRARIES}")
+ MESSAGE(STATUS
+ "Manually adding BLAS_LIBRARIES to LAPACK_LIBRARIES"
+ )
+ LIST(APPEND LAPACK_LIBRARIES ${BLAS_LIBRARIES})
+ ENDIF()
+
+ #
+ # Well, in case of static archives we have to manually pick up the
+ # complete link interface. *sigh*
+ #
+ # Do this unconditionally for the most common case:
+ # TODO: Non-GNU setups...
+ #
+ # Switch the library preference back to prefer dynamic libraries if
+ # DEAL_II_PREFER_STATIC_LIBS=TRUE but DEAL_II_STATIC_EXECUTABLE=FALSE. In
+ # this case system libraries should be linked dynamically.
+ #
+ SWITCH_LIBRARY_PREFERENCE()
+ FOREACH(_lib gfortran m quadmath)
+ FIND_LIBRARY(${_lib}_LIBRARY
+ NAMES ${_lib}
+ HINTS ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
+ MARK_AS_ADVANCED(${_lib}_LIBRARY)
+
+ IF(NOT ${_lib}_LIBRARY MATCHES "-NOTFOUND")
+ LIST(APPEND BLAS_LIBRARIES ${${_lib}_LIBRARY})
+ LIST(APPEND LAPACK_LIBRARIES ${${_lib}_LIBRARY})
+ ENDIF()
+ ENDFOREACH()
+ SWITCH_LIBRARY_PREFERENCE()
+
+ MARK_AS_ADVANCED(
+ BLAS_DIR
+ LAPACK_DIR
+ )
+
+ELSE()
+ SET(DEALII_LAPACK_FOUND FALSE)
+
+ SET(LAPACK_DIR "" CACHE PATH
+ "An optional hint to a LAPACK installation"
+ )
+ SET(BLAS_DIR "" CACHE PATH
+ "An optional hint to a BLAS installation"
+ )
+
+ #
+ # If we couldn't find LAPACK, clean up the library variables:
+ #
+
+ IF("${BLAS_LIBRARIES}" STREQUAL "FALSE")
+ SET(BLAS_LIBRARIES "")
+ ENDIF()
+ IF("${LAPACK_LIBRARIES}" STREQUAL "FALSE")
+ SET(LAPACK_LIBRARIES "")
+ ENDIF()
+
+ENDIF()
diff --git a/deal.II/cmake/modules/FindMETIS.cmake b/deal.II/cmake/modules/FindMETIS.cmake
index f0cfa9eba7..80cbd97d47 100644
--- a/deal.II/cmake/modules/FindMETIS.cmake
+++ b/deal.II/cmake/modules/FindMETIS.cmake
@@ -21,6 +21,9 @@
#
# METIS_LIBRARIES
# METIS_INCLUDE_DIRS
+# METIS_VERSION
+# METIS_VERSION_MAJOR
+# METIS_VERSION_MINOR
#
INCLUDE(FindPackageHandleStandardArgs)
@@ -87,13 +90,27 @@ IF(METIS_FOUND)
#
# Extract the version number out of metis.h
#
- FILE(STRINGS "${METIS_INCLUDE_DIR}/metis.h" METIS_MAJOR_STRING
- REGEX "METIS_VER_MAJOR")
- STRING(REGEX REPLACE "^.*METIS_VER_MAJOR.* ([0-9]+).*" "\\1" METIS_MAJOR "${METIS_MAJOR_STRING}")
-
- FILE(STRINGS "${METIS_INCLUDE_DIR}/metis.h" METIS_MINOR_STRING
- REGEX "METIS_VER_MINOR")
- STRING(REGEX REPLACE "^.*METIS_VER_MINOR.* ([0-9]+).*" "\\1" METIS_MINOR "${METIS_MINOR_STRING}")
+ FILE(STRINGS "${METIS_INCLUDE_DIR}/metis.h" _metis_major_string
+ REGEX "METIS_VER_MAJOR"
+ )
+ STRING(REGEX REPLACE "^.*METIS_VER_MAJOR.* ([0-9]+).*" "\\1"
+ METIS_VERSION_MAJOR "${_metis_major_string}"
+ )
+ FILE(STRINGS "${METIS_INCLUDE_DIR}/metis.h" _metis_minor_string
+ REGEX "METIS_VER_MINOR"
+ )
+ STRING(REGEX REPLACE "^.*METIS_VER_MINOR.* ([0-9]+).*" "\\1"
+ METIS_VERSION_MINOR "${_metis_minor_string}"
+ )
+ FILE(STRINGS "${METIS_INCLUDE_DIR}/metis.h" _metis_subminor_string
+ REGEX "METIS_VER_SUBMINOR"
+ )
+ STRING(REGEX REPLACE "^.*METIS_VER_SUBMINOR.* ([0-9]+).*" "\\1"
+ METIS_VERSION_SUBMINOR "${_metis_subminor_string}"
+ )
+ SET(METIS_VERSION
+ "${METIS_VERSION_MAJOR}.${METIS_VERSION_MINOR}.${METIS_VERSION_SUBMINOR}"
+ )
MARK_AS_ADVANCED(METIS_DIR)
ELSE()
diff --git a/deal.II/cmake/modules/FindP4EST.cmake b/deal.II/cmake/modules/FindP4EST.cmake
index 06e031198a..173da3893a 100644
--- a/deal.II/cmake/modules/FindP4EST.cmake
+++ b/deal.II/cmake/modules/FindP4EST.cmake
@@ -21,6 +21,11 @@
# P4EST_LIBRARIES
# P4EST_INCLUDE_DIRS
# P4EST_WITH_MPI
+# P4EST_VERSION
+# P4EST_VERSION_MAJOR
+# P4EST_VERSION_MINOR
+# P4EST_VERSION_SUBMINOR
+# P4EST_VERSION_PATCH
#
INCLUDE(FindPackageHandleStandardArgs)
@@ -50,7 +55,7 @@ ENDIF()
# given, take what we chose for p4est.
#
-FIND_PATH(P4EST_INCLUDE_DIR p4est.h
+FIND_PATH(P4EST_INCLUDE_DIR p4est_config.h
HINTS
${P4EST_DIR}
PATH_SUFFIXES
@@ -121,6 +126,27 @@ IF(P4EST_FOUND)
SET(P4EST_WITH_MPI TRUE)
ENDIF()
+ #
+ # Extract version numbers:
+ #
+ FILE(STRINGS "${P4EST_INCLUDE_DIR}/p4est_config.h" P4EST_VERSION
+ REGEX "#define P4EST_VERSION \"")
+ STRING(REGEX REPLACE "^.*P4EST_VERSION.*\"([0-9]+.*)\".*" "\\1"
+ P4EST_VERSION "${P4EST_VERSION}"
+ )
+ STRING(REGEX REPLACE
+ "^([0-9]+).*$" "\\1"
+ P4EST_VERSION_MAJOR "${P4EST_VERSION}")
+ STRING(REGEX REPLACE
+ "^[0-9]+\\.([0-9]+).*$" "\\1"
+ P4EST_VERSION_MINOR "${P4EST_VERSION}")
+ STRING(REGEX REPLACE
+ "^[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
+ P4EST_VERSION_SUBMINOR "${P4EST_VERSION}")
+ STRING(REGEX REPLACE
+ "^[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
+ P4EST_VERSION_PATCH "${P4EST_VERSION}")
+
MARK_AS_ADVANCED(P4EST_DIR)
ELSE()
SET(P4EST_DIR "" CACHE PATH
diff --git a/deal.II/cmake/modules/FindPETSC.cmake b/deal.II/cmake/modules/FindPETSC.cmake
index 119fa42026..1b2bce5049 100644
--- a/deal.II/cmake/modules/FindPETSC.cmake
+++ b/deal.II/cmake/modules/FindPETSC.cmake
@@ -199,7 +199,9 @@ IF(PETSC_FOUND)
PETSC_VERSION_PATCH "${PETSC_VERSION_PATCH_STRING}"
)
- SET(PETSC_VERSION "${PETSC_VERSION_MAJOR}.${PETSC_VERSION_MINOR}.${PETSC_VERSION_SUBMINOR}")
+ SET(PETSC_VERSION
+ "${PETSC_VERSION_MAJOR}.${PETSC_VERSION_MINOR}.${PETSC_VERSION_SUBMINOR}.${PETSC_VERSION_PATCH}"
+ )
MARK_AS_ADVANCED(PETSC_ARCH PETSC_DIR)
ELSE()
diff --git a/deal.II/cmake/modules/FindSCALAPACK.cmake b/deal.II/cmake/modules/FindSCALAPACK.cmake
index 4cd616dbae..96a6a539b3 100644
--- a/deal.II/cmake/modules/FindSCALAPACK.cmake
+++ b/deal.II/cmake/modules/FindSCALAPACK.cmake
@@ -41,7 +41,7 @@ FIND_LIBRARY(SCALAPACK_LIBRARY NAMES scalapack
# SCALAPACK needs LAPACK and BLAS as dependency, search for them with the help
# of the LAPACK find module:
#
-FIND_PACKAGE(LAPACK)
+FIND_PACKAGE(DEALII_LAPACK)
#
# Well, depending on the version of scalapack and the distribution it might
diff --git a/deal.II/cmake/modules/FindSLEPC.cmake b/deal.II/cmake/modules/FindSLEPC.cmake
index ddb706d05b..9de3500f45 100644
--- a/deal.II/cmake/modules/FindSLEPC.cmake
+++ b/deal.II/cmake/modules/FindSLEPC.cmake
@@ -121,7 +121,9 @@ IF(SLEPC_FOUND)
SLEPC_VERSION_PATCH "${SLEPC_VERSION_PATCH_STRING}"
)
- SET(SLEPC_VERSION "${SLEPC_VERSION_MAJOR}.${SLEPC_VERSION_MINOR}.${SLEPC_VERSION_SUBMINOR}")
+ SET(SLEPC_VERSION
+ "${SLEPC_VERSION_MAJOR}.${SLEPC_VERSION_MINOR}.${SLEPC_VERSION_SUBMINOR}.${SLEPC_VERSION_PATCH}"
+ )
MARK_AS_ADVANCED(SLEPC_DIR)
ELSE()
diff --git a/deal.II/cmake/modules/FindTRILINOS.cmake b/deal.II/cmake/modules/FindTRILINOS.cmake
index f5f8d2240d..b347b32ccf 100644
--- a/deal.II/cmake/modules/FindTRILINOS.cmake
+++ b/deal.II/cmake/modules/FindTRILINOS.cmake
@@ -19,13 +19,16 @@
#
# This module exports:
#
-# TRILINOS_DIR (cached)
+# TRILINOS_DIR
# TRILINOS_INCLUDE_DIRS
# TRILINOS_LIBRARIES
+# TRILINOS_VERSION
# TRILINOS_VERSION_MAJOR
# TRILINOS_VERSION_MINOR
# TRILINOS_VERSION_SUBMINOR
# TRILINOS_WITH_MPI
+# TRILINOS_SUPPORTS_CPP11
+# TRILINOS_HAS_C99_TR1_WORKAROUND
#
INCLUDE(FindPackageHandleStandardArgs)
@@ -33,13 +36,13 @@ INCLUDE(FindPackageHandleStandardArgs)
SET_IF_EMPTY(TRILINOS_DIR "$ENV{TRILINOS_DIR}")
#
-# Include the trilinos package configuration:
+# Do not include TrilinosConfig.cmake directly, it is just too big o_O
#
-FIND_PACKAGE(TRILINOS_CONFIG
- CONFIG QUIET
- NAMES Trilinos TRILINOS
+# Just search for the file:
+#
+FIND_FILE(TRILINOS_CONFIG
+ NAMES TrilinosConfig.cmake trilinos-config.cmake
HINTS
- ${TRILINOS_DIR}/lib/cmake/Trilinos
${TRILINOS_DIR}
PATH_SUFFIXES
lib64/cmake/Trilinos
@@ -50,7 +53,72 @@ FIND_PACKAGE(TRILINOS_CONFIG
NO_SYSTEM_ENVIRONMENT_PATH
)
-SET(TRILINOS_INCLUDE_DIRS ${Trilinos_INCLUDE_DIRS})
+IF(NOT "${TRILINOS_CONFIG}" STREQUAL "${TRILINOS_CONFIG_SAVED}")
+ SET(_new_trilinos_config TRUE)
+ENDIF()
+SET(TRILINOS_CONFIG_SAVED "${TRILINOS_CONFIG}" CACHE INTERNAL "" FORCE)
+
+
+IF(NOT TRILINOS_CONFIG MATCHES "-NOTFOUND")
+
+ SET(_filtered_trilinos_config
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TrilinosConfig.cmake"
+ )
+
+ IF(_new_trilinos_config)
+ GET_FILENAME_COMPONENT(_trilinos_path "${TRILINOS_CONFIG}" PATH)
+ FILE(WRITE ${_filtered_trilinos_config} "SET(_cmake_current_list_dir ${_trilinos_path})\n")
+
+ #
+ # Only pick up every line that starts with "^SET("...
+ #
+ FILE(STRINGS "${TRILINOS_CONFIG}" _trilinos_config_filtered REGEX "^SET")
+
+ FOREACH(_line ${_trilinos_config_filtered})
+ STRING(REPLACE "CMAKE_CURRENT_LIST_DIR" "_cmake_current_list_dir"
+ _line "${_line}"
+ )
+ FILE(APPEND ${_filtered_trilinos_config} "${_line}\n")
+ ENDFOREACH()
+ ENDIF()
+
+ #
+ # ... and include only that:
+ #
+ INCLUDE(${_filtered_trilinos_config})
+
+ SET(TRILINOS_CONFIG_FOUND TRUE)
+ENDIF()
+
+
+#
+# Look for the one include file that we'll query for further information:
+#
+IF(_new_trilinos_config)
+ UNSET(EPETRA_CONFIG_H CACHE)
+ENDIF()
+FIND_FILE(EPETRA_CONFIG_H Epetra_config.h
+ HINTS ${Trilinos_INCLUDE_DIRS}
+ NO_DEFAULT_PATH
+ NO_CMAKE_ENVIRONMENT_PATH
+ NO_CMAKE_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ NO_CMAKE_SYSTEM_PATH
+ NO_CMAKE_FIND_ROOT_PATH
+ )
+IF(EPETRA_CONFIG_H MATCHES "-NOTFOUND")
+ SET(TRILINOS_CONFIG_FOUND FALSE)
+ELSE()
+ SET(TRILINOS_INCLUDE_DIRS ${Trilinos_INCLUDE_DIRS})
+ #
+ # *Boy* Sanitize the include paths given by TrilinosConfig.cmake...
+ #
+ STRING(REGEX REPLACE
+ "(lib64|lib)\\/cmake\\/Trilinos\\/\\.\\.\\/\\.\\.\\/\\.\\.\\/" ""
+ TRILINOS_INCLUDE_DIRS "${TRILINOS_INCLUDE_DIRS}"
+ )
+ENDIF()
+
#
# We'd like to have the full library names but the Trilinos package only
@@ -58,6 +126,10 @@ SET(TRILINOS_INCLUDE_DIRS ${Trilinos_INCLUDE_DIRS})
# So we check again for every lib and store the full path:
#
FOREACH(_library ${Trilinos_LIBRARIES})
+ IF(_new_trilinos_config)
+ UNSET(TRILINOS_LIBRARY_${_library} CACHE)
+ ENDIF()
+
FIND_LIBRARY(TRILINOS_LIBRARY_${_library}
NAMES ${_library}
HINTS ${Trilinos_LIBRARY_DIRS}
@@ -69,13 +141,11 @@ FOREACH(_library ${Trilinos_LIBRARIES})
NO_CMAKE_FIND_ROOT_PATH
)
- LIST(APPEND TRILINOS_LIBRARIES ${TRILINOS_LIBRARY_${_library}})
-
- #
- # Remove the variables from the cache, so that updating TRILINOS_DIR will
- # find the new libraries..
- #
- UNSET(TRILINOS_LIBRARY_${_library} CACHE)
+ IF(TRILINOS_LIBRARY_${_library} MATCHES "-NOTFOUND")
+ SET(TRILINOS_CONFIG_FOUND FALSE)
+ ELSE()
+ LIST(APPEND TRILINOS_LIBRARIES ${TRILINOS_LIBRARY_${_library}})
+ ENDIF()
ENDFOREACH()
#
@@ -96,8 +166,10 @@ MARK_AS_ADVANCED(TRILINOS_CONFIG_DIR)
IF(TRILINOS_FOUND)
#
- # Extract the major and minor version numbers:
+ # Extract version numbers:
#
+ SET(TRILINOS_VERSION "${Trilinos_VERSION}")
+
STRING(REGEX REPLACE
"^([0-9]+).*$" "\\1"
TRILINOS_VERSION_MAJOR "${Trilinos_VERSION}")
@@ -113,15 +185,6 @@ IF(TRILINOS_FOUND)
#
# Determine whether Trilinos was configured with MPI and 64bit indices:
#
- FIND_FILE(EPETRA_CONFIG_H Epetra_config.h
- HINTS ${TRILINOS_INCLUDE_DIRS}
- NO_DEFAULT_PATH
- NO_CMAKE_ENVIRONMENT_PATH
- NO_CMAKE_PATH
- NO_SYSTEM_ENVIRONMENT_PATH
- NO_CMAKE_SYSTEM_PATH
- NO_CMAKE_FIND_ROOT_PATH
- )
FILE(STRINGS "${EPETRA_CONFIG_H}" EPETRA_MPI_STRING
REGEX "#define HAVE_MPI")
IF("${EPETRA_MPI_STRING}" STREQUAL "")
@@ -144,10 +207,46 @@ IF(TRILINOS_FOUND)
SET(TRILINOS_WITH_NO_64BITS_INDICES FALSE)
ENDIF()
- UNSET(EPETRA_CONFIG_H CACHE)
+ #
+ # Some versions of Sacado_cmath.hpp do things that aren't compatible
+ # with the -std=c++0x flag of GCC, see deal.II FAQ.
+ # Test whether that is indeed the case:
+ #
+ IF(_new_trilinos_config)
+ UNSET(TRILINOS_SUPPORTS_CPP11 CACHE)
+ UNSET(TRILINOS_HAS_C99_TR1_WORKAROUND CACHE)
+ ENDIF()
+
+ LIST(APPEND CMAKE_REQUIRED_INCLUDES ${TRILINOS_INCLUDE_DIRS})
+ PUSH_TEST_FLAG("${DEAL_II_CXX11_FLAG}")
+
+ CHECK_CXX_SOURCE_COMPILES(
+ "
+ #include
+ int main(){ return 0; }
+ "
+ TRILINOS_SUPPORTS_CPP11
+ )
+
+ #
+ # Try whether exporting HAS_C99_TR1_CMATH helps:
+ #
+ PUSH_TEST_FLAG("-DHAS_C99_TR1_CMATH")
+ CHECK_CXX_SOURCE_COMPILES(
+ "
+ #include
+ int main(){ return 0; }
+ "
+ TRILINOS_HAS_C99_TR1_WORKAROUND
+ )
+
+ RESET_CMAKE_REQUIRED()
+
MARK_AS_ADVANCED(TRILINOS_DIR)
+
ELSE()
+
SET(TRILINOS_DIR "" CACHE PATH
"An optional hint to a Trilinos installation"
)
diff --git a/deal.II/cmake/modules/FindUMFPACK.cmake b/deal.II/cmake/modules/FindUMFPACK.cmake
index 378b68cb56..746fdf0143 100644
--- a/deal.II/cmake/modules/FindUMFPACK.cmake
+++ b/deal.II/cmake/modules/FindUMFPACK.cmake
@@ -36,7 +36,7 @@ ENDFOREACH()
# TODO: There might be an external dependency for metis, ignore this for
# now.
#
-FIND_PACKAGE(LAPACK)
+FIND_PACKAGE(DEALII_LAPACK)
FIND_PACKAGE(METIS)
#
diff --git a/deal.II/cmake/setup_cached_variables.cmake b/deal.II/cmake/setup_cached_variables.cmake
index e8667e17c1..c2e04fe20d 100644
--- a/deal.II/cmake/setup_cached_variables.cmake
+++ b/deal.II/cmake/setup_cached_variables.cmake
@@ -39,7 +39,6 @@
# DEAL_II_PREFER_STATIC_LIBS
# DEAL_II_STATIC_EXECUTABLE
# CMAKE_INSTALL_RPATH_USE_LINK_PATH
-# CMAKE_C_FLAGS *)
# CMAKE_CXX_FLAGS *)
# DEAL_II_LINKER_FLAGS *)
# DEAL_II_CXX_FLAGS_DEBUG
@@ -48,7 +47,7 @@
# DEAL_II_LINKER_FLAGS_RELEASE
# DEAL_II_WITH_64BIT_INDICES
#
-# *) May also be set via environment variable (CFLAGS, CXXFLAGS, LDFLAGS)
+# *) May also be set via environment variable (CXXFLAGS, LDFLAGS)
# (a nonempty cached variable has precedence and will not be
# overwritten by environment)
#
@@ -142,7 +141,7 @@ ENDIF()
OPTION(DEAL_II_ALLOW_PLATFORM_INTROSPECTION
- "Allow platform introspection for CPU command set, SSE and AVX"
+ "Allow platform introspection for CPU command sets, SSE and AVX"
ON
)
MARK_AS_ADVANCED(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
@@ -201,7 +200,6 @@ OPTION(DEAL_II_WITH_64BIT_INDICES
)
-
#
# Tell the user very prominently, that we're doing things differently w.r.t
# CMAKE_(C|CXX)_FLAGS_(DEBUG|RELEASE)
@@ -213,6 +211,7 @@ FOREACH(_flag
SHARED_LINKER_FLAGS_DEBUG
)
IF(NOT "${CMAKE_${_flag}}" STREQUAL "")
+ UNSET(${CMAKE_${_flag}} CACHE)
MESSAGE(FATAL_ERROR
"\nThe deal.II cmake build system does not use CMAKE_${_flag}.\n"
"Use DEAL_II_${_flag}, instead!\n\n"
@@ -220,6 +219,7 @@ FOREACH(_flag
ENDIF()
ENDFOREACH()
+
#
# Hide all unused compiler flag variables:
#
@@ -246,6 +246,7 @@ FOREACH(_flag
SET(${_flag} "" CACHE INTERNAL "" FORCE)
ENDFOREACH()
+
#
# Set cached compiler flags to an empty string:
#
diff --git a/deal.II/cmake/setup_compiler_flags.cmake b/deal.II/cmake/setup_compiler_flags.cmake
index 4815abf65f..f82147f9e8 100644
--- a/deal.II/cmake/setup_compiler_flags.cmake
+++ b/deal.II/cmake/setup_compiler_flags.cmake
@@ -65,22 +65,25 @@
#
# Check the user provided CXX flags:
#
+
MESSAGE(STATUS "")
IF(NOT "${CMAKE_CXX_FLAGS_SAVED}" STREQUAL "${DEAL_II_CXX_FLAGS_SAVED}")
+ # Rerun this test if cxx flags changed:
UNSET(DEAL_II_HAVE_USABLE_CXX_FLAGS CACHE)
ENDIF()
SET(DEAL_II_CXX_FLAGS_SAVED "${CMAKE_CXX_FLAGS_SAVED}" CACHE INTERNAL "" FORCE)
-SET(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS_SAVED}")
+# Initialize all CMAKE_REQUIRED_* variables a this point:
+RESET_CMAKE_REQUIRED()
+
CHECK_CXX_SOURCE_COMPILES(
"int main(){ return 0; }"
DEAL_II_HAVE_USABLE_CXX_FLAGS)
-SET(CMAKE_REQUIRED_FLAGS "")
IF(NOT DEAL_II_HAVE_USABLE_CXX_FLAGS)
UNSET(DEAL_II_HAVE_USABLE_CXX_FLAGS CACHE)
MESSAGE(FATAL_ERROR "\n"
- "Configuration error: Cannot compile with the specified CXX flags: "
+ "Configuration error: Cannot compile with the user supplied CXX flags:\n"
"${CMAKE_CXX_FLAGS_SAVED}\n"
)
ENDIF()
diff --git a/deal.II/cmake/setup_compiler_flags_gnu.cmake b/deal.II/cmake/setup_compiler_flags_gnu.cmake
index 63bf98e31a..14884e265d 100644
--- a/deal.II/cmake/setup_compiler_flags_gnu.cmake
+++ b/deal.II/cmake/setup_compiler_flags_gnu.cmake
@@ -73,6 +73,12 @@ ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wswitch")
#
ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused-local-typedefs")
+#
+# Disable Wlong-long that will trigger a lot of warnings when compiling
+# with disabled C++11 support:
+#
+ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-long-long")
+
#
# Disable deprecation warnings
#
@@ -148,7 +154,7 @@ IF (CMAKE_BUILD_TYPE MATCHES "Debug")
#
# If -Og is not available, fall back to -O0:
#
- IF(NOT DEAL_II_HAVE_FLAG_O0)
+ IF(NOT DEAL_II_HAVE_FLAG_Og)
ADD_FLAGS(DEAL_II_CXX_FLAGS_DEBUG "-O0")
ENDIF()
diff --git a/deal.II/cmake/setup_compiler_flags_intel.cmake b/deal.II/cmake/setup_compiler_flags_intel.cmake
index e08b7a382a..ed67d96ad3 100644
--- a/deal.II/cmake/setup_compiler_flags_intel.cmake
+++ b/deal.II/cmake/setup_compiler_flags_intel.cmake
@@ -104,11 +104,24 @@ IF (CMAKE_BUILD_TYPE MATCHES "Release")
#
# General optimization flags:
#
- ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O1")
+
+ IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "13.0" )
+ ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O2")
+ ELSE()
+ #
+ # Disable aggressive optimization for intel-13* compilers, until we
+ # resolve a lot of funny miscompilations...
+ #
+ # - Maier, 2013
+ #
+ ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O1")
+ ENDIF()
+
ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-ip")
ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-loops")
- ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-ansi-alias") # equiv. -fstrict-aliasing
+ # equivalent to -fno-strict-aliasing:
+ ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-no-ansi-alias")
ENDIF()
diff --git a/deal.II/cmake/setup_deal_ii.cmake b/deal.II/cmake/setup_deal_ii.cmake
index 931bf618f3..a07c54f465 100644
--- a/deal.II/cmake/setup_deal_ii.cmake
+++ b/deal.II/cmake/setup_deal_ii.cmake
@@ -51,8 +51,6 @@
# DEAL_II_PROJECT_CONFIG_RELDIR *)
#
# DEAL_II_BUILD_TYPES
-# DEAL_II_WITH_BUNDLED_DIRECTORY
-# DEAL_II_WITH_DOC_DIRECTORY
#
# *) Can be overwritten by the command line via -D<...>
#
@@ -112,7 +110,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") )
#
# Ensure that in case of an out of source build BINARY_DIR/include !=
- # INSTALL_PREFIX/include us always true. Otherwise stale headers might
+ # INSTALL_PREFIX/include is always true. Otherwise stale headers might
# get included resulting in a failing build.
#
SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include/install")
@@ -146,49 +144,3 @@ IF(CMAKE_BUILD_TYPE MATCHES "Release")
LIST(APPEND DEAL_II_BUILD_TYPES "RELEASE")
ENDIF()
-
-########################################################################
-# #
-# Cleanup and setup that has to happen after the call to PROJECT(): #
-# #
-########################################################################
-
-#
-# Cleanup some files used for storing the names of all object targets that
-# will be bundled to the deal.II library.
-# (Right now, i.e. cmake 2.8.8, this is the only reliable way to get
-# information into a global scope...)
-#
-FOREACH(_build ${DEAL_II_BUILD_TYPES})
- STRING(TOLOWER "${_build}" _build_lowercase)
- FILE(REMOVE
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_objects_${_build_lowercase}
- )
-ENDFOREACH()
-
-IF(DEAL_II_PREFER_STATIC_LIBS)
- #
- # Invert the search order for libraries when DEAL_II_PREFER_STATIC_LIBS
- # is set. This will prefer static archives instead of shared libraries:
- #
- # TODO: Does this work on a Windows or CYGWIN target?
- LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
-ENDIF()
-
-#
-# Cross compilation stuff:
-#
-IF(CMAKE_CROSSCOMPILING)
- #
- # Disable platform introspection when cross compiling
- #
- SET(DEAL_II_ALLOW_PLATFORM_INTROSPECTION OFF CACHE BOOL "" FORCE)
-
- #
- # Import native expand_instantiations for use in cross compilation:
- #
- SET(DEAL_II_NATIVE "DEAL_II_NATIVE-NOTFOUND" CACHE FILEPATH
- "A pointer to a native deal.Ii build directory"
- )
- INCLUDE(${DEAL_II_NATIVE}/cmake/scripts/importExecutables.cmake)
-ENDIF()
diff --git a/deal.II/cmake/setup_finalize.cmake b/deal.II/cmake/setup_finalize.cmake
index e2f919a309..a651931f34 100644
--- a/deal.II/cmake/setup_finalize.cmake
+++ b/deal.II/cmake/setup_finalize.cmake
@@ -60,6 +60,19 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES})
ENDIF()
ENDFOREACH()
+#
+# Cleanup some files used for storing the names of all object targets that
+# will be bundled to the deal.II library.
+# (Right now, i.e. cmake 2.8.8, this is the only reliable way to get
+# information into a global scope...)
+#
+FOREACH(_build ${DEAL_II_BUILD_TYPES})
+ STRING(TOLOWER "${_build}" _build_lowercase)
+ FILE(REMOVE
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_objects_${_build_lowercase}
+ )
+ENDFOREACH()
+
########################################################################
# #
@@ -159,9 +172,7 @@ FOREACH(_var ${_variables})
LIST(APPEND _components "${_var}")
ELSEIF(_var MATCHES "(MPI_CXX_COMPILER|MPI_CXX_COMPILE_FLAGS|MPI_CXX_LINK_FLAGS)")
LIST(APPEND _features_config ${_var})
- ELSEIF(_var MATCHES "(LIBRARIES|INCLUDE_PATH|INCLUDE_DIRS|LINKER_FLAGS)"
- # Avoid a lot of Trilinos variables:
- AND (NOT _var MATCHES "_TPL_|_MPI_") )
+ ELSEIF(_var MATCHES "(LIBRARIES|INCLUDE_PATH|INCLUDE_DIRS|LINKER_FLAGS)")
LIST(APPEND _features_config ${_var})
ENDIF()
ENDFOREACH()
@@ -173,6 +184,20 @@ FOREACH(_var ${_features})
IF(FEATURE_${_feature}_EXTERNAL_CONFIGURED)
_both("# ${_var} set up with external dependencies\n")
+ #
+ # Print out version number:
+ #
+ IF(DEFINED ${_feature}_VERSION)
+ _detailed("# ${_feature}_VERSION = ${${_feature}_VERSION}\n")
+ ENDIF()
+
+ #
+ # Print out ${_feature}_DIR:
+ #
+ IF(DEFINED ${_feature}_DIR)
+ _detailed("# ${_feature}_DIR = ${${_feature}_DIR}\n")
+ ENDIF()
+
#
# Print the feature configuration:
#
diff --git a/deal.II/cmake/setup_post_project_call.cmake b/deal.II/cmake/setup_post_project_call.cmake
new file mode 100644
index 0000000000..690acf5d5d
--- /dev/null
+++ b/deal.II/cmake/setup_post_project_call.cmake
@@ -0,0 +1,53 @@
+## ---------------------------------------------------------------------
+## $Id$
+##
+## 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.
+##
+## ---------------------------------------------------------------------
+
+
+########################################################################
+# #
+# Setup that has to happen after the call to PROJECT(): #
+# #
+########################################################################
+
+#
+# Library search order:
+#
+IF(DEAL_II_PREFER_STATIC_LIBS)
+ #
+ # Invert the search order for libraries when DEAL_II_PREFER_STATIC_LIBS
+ # is set. This will prefer static archives instead of shared libraries:
+ #
+ # TODO: Does this work on a Windows or CYGWIN target?
+ LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
+ENDIF()
+
+
+#
+# Cross compilation stuff:
+#
+IF(CMAKE_CROSSCOMPILING)
+ #
+ # Disable platform introspection when cross compiling
+ #
+ SET(DEAL_II_ALLOW_PLATFORM_INTROSPECTION OFF CACHE BOOL "" FORCE)
+
+ #
+ # Import native expand_instantiations for use in cross compilation:
+ #
+ SET(DEAL_II_NATIVE "DEAL_II_NATIVE-NOTFOUND" CACHE FILEPATH
+ "A pointer to a native deal.Ii build directory"
+ )
+ INCLUDE(${DEAL_II_NATIVE}/cmake/scripts/importExecutables.cmake)
+ENDIF()
diff --git a/deal.II/contrib/mesh_conversion/README.txt b/deal.II/contrib/mesh_conversion/README.txt
index 77f4d27d0f..ef00b074b1 100644
--- a/deal.II/contrib/mesh_conversion/README.txt
+++ b/deal.II/contrib/mesh_conversion/README.txt
@@ -6,7 +6,7 @@ Use: Convert an ABAQUS .inp file to an AVS UCD file.
Author: Jean-Paul Pelteret
jppelteret.uct@gmail.com
- modified by: Timo Heister, heister@math.tamu.edu
+ modified by: Timo Heister, heister@clemson.edu
===================================================
diff --git a/deal.II/doc/CMakeLists.txt b/deal.II/doc/CMakeLists.txt
index eeb7064928..8e63586481 100644
--- a/deal.II/doc/CMakeLists.txt
+++ b/deal.II/doc/CMakeLists.txt
@@ -15,11 +15,6 @@
## ---------------------------------------------------------------------
-#
-# Required packages for the document generation:
-#
-FIND_PACKAGE(Perl)
-FIND_PACKAGE(Doxygen)
#
@@ -27,6 +22,12 @@ FIND_PACKAGE(Doxygen)
#
IF(DEAL_II_COMPONENT_DOCUMENTATION)
+ #
+ # Required packages for the document generation:
+ #
+ FIND_PACKAGE(Perl)
+ FIND_PACKAGE(Doxygen)
+
#
# Do we have all necessary dependencies?
#
diff --git a/deal.II/doc/authors.html b/deal.II/doc/authors.html
index 1af8db86d0..494df11f73 100644
--- a/deal.II/doc/authors.html
+++ b/deal.II/doc/authors.html
@@ -30,9 +30,9 @@
- Timo Heister,
- Texas A&M University, TX, USA
+ Clemson University, SC, USA
@@ -164,6 +164,9 @@
Support for arbitrary nodes in FE_Q. Matrix-free
framework. step-37 and step-48 tutorial programs.
+ Oleh Krehel:
+ Many documentation fixes.
+
Martin Kronbichler:
step-22, step-31, step-32, step-37, step-48, interfaces to
Trilinos, significant parts of ConstraintMatrix, matrix-free
diff --git a/deal.II/doc/development/Config.sample b/deal.II/doc/development/Config.sample
index 6f4ad89247..aeb340ced3 100644
--- a/deal.II/doc/development/Config.sample
+++ b/deal.II/doc/development/Config.sample
@@ -243,7 +243,15 @@
# BLA_VENDOR will also be recognized by FindLAPACK.cmake.
#
# If your BLAS/LAPACK installation resides at a non system location, specify
-# a hint with CMAKE_PREFIX_PATH.
+# a hint with LAPACK_DIR and BLAS_DIR, or CMAKE_PREFIX_PATH:
+#
+# SET(LAPACK_DIR "..." CACHE PATH
+# "The preferred installation prefix for searching for LAPACK"
+# )
+#
+# SET(BLAS_DIR "..." CACHE PATH
+# "The preferred installation prefix for searching for BLAS"
+# )
#
#
# Manual setup:
diff --git a/deal.II/doc/development/cmake-internals.html b/deal.II/doc/development/cmake-internals.html
index cacc2e4bbe..903af06bfa 100644
--- a/deal.II/doc/development/cmake-internals.html
+++ b/deal.II/doc/development/cmake-internals.html
@@ -19,7 +19,7 @@
This page provides details about the CMake build system. Files
processed by the top level CMakeLists.txt
script are
- listed in the TOC in cronological order.
+ listed in the TOC in chronological order.
@@ -115,7 +115,7 @@
)
CMake operates almost always with variables in global state. To guard
- against accidential overwrite of variables the following naming
+ against accidental overwrite of variables the following naming
conventions must be followed at all times:
-
@@ -260,11 +260,11 @@
CHECK_CXX_SOURCE_COMPILES(source variable)
- - Checks whether it is possible to compile _and_ link the code snipet
- <source>. If succesful, variable is set to 1.
+ - Checks whether it is possible to compile _and_ link the code snippet
+ <source>. If successful, variable is set to 1.
CHECK_CXX_SOURCE_RUNS(source variable)
- - variable is set to 1 if <source> coulde be succesfully compiled and
+ - variable is set to 1 if <source> could be successfully compiled and
linked and the resulting program ran and exited without error.
Avoid this macro outside of a DEAL_II_ALLOW_PLATFORM_INTROSPECTION
guard. A sensible fallback should be provided if the check cannot
@@ -303,15 +303,18 @@
POP_TEST_FLAG()
- - Libraries necessary for linkage can be set in the list variable
-
CMAKE_REQUIRED_LIBRARIES
. It is best two hard set
- this variable to a specific value and later on cleaning it,
- instead of appending/removing:
+ - Necessary include directories and libraries necessary for
+ linkage can be set in the list variables
+
CMAKE_REQUIRED_INCLUDES
and
+ CMAKE_REQUIRED_LIBRARIES
. It is best to append these
+ lists and later on reset CMAKE_REQUIRED_*
(including
+ CMAKE_REQUIRED_FLAGS
) to their default values:
- SET(CMAKE_REQUIRED_LIBRARIES <a list of libraries>
+ LIST(APPEND CMAKE_REQUIRED_INCLUDES <a list of includes>)
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES <a list of libraries>)
CHECK_CXX_SOURCE_COMPILES(...)
- SET(CMAKE_REQUIRED_LIBRARIES)
+ RESET_CMAKE_REQUIRED()
@@ -429,7 +432,7 @@
FEATURE_<FEATURE>_DEPENDS (a variable)
- a variable which contains an optional list of other features
- this feature depends on (and which have to be enbled for this feature
+ this feature depends on (and which have to be enabled for this feature
to work.) The features must be given with the full option toggle:
DEAL_II_WITH_[...]
@@ -604,7 +607,7 @@
# Glob for all header files associated with the object target:
# As this list is only for cosmetic reasons, so that associated header
# files show up in IDEs, we don't manage an explicit list (with the
- # tradeoff to have to run "make rebuild_cache" when a new header file
+ # trade-off to have to run "make rebuild_cache" when a new header file
# emerges...)
#
FILE(GLOB _header
@@ -672,7 +675,7 @@
- The deal.II Group
+ The deal.II Group
$Date$