From: young
Date: Mon, 30 Sep 2013 15:23:07 +0000 (+0000)
Subject: Merge from trunk to branch; mask data_out_dof_data.
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=674b411b722389bac101163bbcaaa31baf931bfe;p=dealii-svn.git
Merge from trunk to branch; mask data_out_dof_data.
git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@31040 0785d39b-7218-0410-832d-ea1e28bc413d
---
diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt
index b665897d70..714613a8c7 100644
--- a/deal.II/CMakeLists.txt
+++ b/deal.II/CMakeLists.txt
@@ -1,30 +1,32 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
-## ##
-# The cmake build system for the deal.II project #
-# #
-# See doc/readme.html and doc/development/cmake.html for further #
-# details on how to use the cmake build system of deal.II. #
-## ##
+## ##
+# The cmake build system for the deal.II project #
+# #
+# See doc/readme.html and doc/development/cmake.html for further #
+# details on how to use the cmake build system of deal.II. #
+## ##
-###########################################################################
-# #
-# Configuration: #
-# #
-###########################################################################
+########################################################################
+# #
+# Configuration: #
+# #
+########################################################################
#
# General configuration for cmake:
@@ -47,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)
@@ -57,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:
@@ -66,7 +76,12 @@ INCLUDE(setup_cached_variables)
#
# Now, set the project and set up the rest:
#
-PROJECT(deal.II)
+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)
@@ -105,11 +120,11 @@ ENDFOREACH()
INCLUDE(setup_finalize)
-###########################################################################
-# #
-# Compilation and installation: #
-# #
-###########################################################################
+########################################################################
+# #
+# Compilation and installation: #
+# #
+########################################################################
MESSAGE(STATUS "")
MESSAGE(STATUS "Configuring done. Proceed to target definitions now.")
@@ -130,10 +145,9 @@ ADD_SUBDIRECTORY(cmake/config) # has to be included after source
ADD_SUBDIRECTORY(contrib) # has to be included after source
ADD_SUBDIRECTORY(examples)
-#
-# Define some custom targets for convenience
-#
-INCLUDE(setup_custom_targets)
+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/LICENSE b/deal.II/LICENSE
index 2d1d7b4a83..8b89d07dc6 100644
--- a/deal.II/LICENSE
+++ b/deal.II/LICENSE
@@ -477,47 +477,3 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This library is free software; you can 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.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- , 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/deal.II/VERSION b/deal.II/VERSION
index 941ceb5b07..091a617214 100644
--- a/deal.II/VERSION
+++ b/deal.II/VERSION
@@ -1 +1 @@
-8.0.pre
+8.1.pre
diff --git a/deal.II/bundled/CMakeLists.txt b/deal.II/bundled/CMakeLists.txt
index 44418f02d4..897b4632e1 100644
--- a/deal.II/bundled/CMakeLists.txt
+++ b/deal.II/bundled/CMakeLists.txt
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Export information about bundled library locations and do the actual
@@ -33,6 +35,9 @@ IF(FEATURE_BOOST_BUNDLED_CONFIGURED)
COMPONENT library
PATTERN ".svn" EXCLUDE
)
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_source_includes
+ "${BOOST_FOLDER}/include\n"
+ )
ADD_SUBDIRECTORY(${BOOST_FOLDER}/libs/serialization/src)
@@ -66,9 +71,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
@@ -85,6 +91,9 @@ IF(FEATURE_THREADS_BUNDLED_CONFIGURED)
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_source_includes
+ "${TBB_FOLDER}/include\n"
+ )
ADD_SUBDIRECTORY(${TBB_FOLDER}/src)
ENDIF()
diff --git a/deal.II/bundled/boost-1.49.0/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp b/deal.II/bundled/boost-1.49.0/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp
index 8f9b94a5cd..e1cd851940 100644
--- a/deal.II/bundled/boost-1.49.0/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp
+++ b/deal.II/bundled/boost-1.49.0/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp
@@ -18,4 +18,4 @@
#include
#else
#error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers"
-#endif
\ No newline at end of file
+#endif
diff --git a/deal.II/bundled/boost-1.49.0/include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp b/deal.II/bundled/boost-1.49.0/include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp
index ec01d4b7fd..234936c587 100644
--- a/deal.II/bundled/boost-1.49.0/include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp
+++ b/deal.II/bundled/boost-1.49.0/include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp
@@ -18,4 +18,4 @@
#include
#else
#error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers"
-#endif
\ No newline at end of file
+#endif
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/bundled/boost-1.49.0/include/boost/thread/xtime.hpp b/deal.II/bundled/boost-1.49.0/include/boost/thread/xtime.hpp
index 7cc6272d6a..f908298647 100644
--- a/deal.II/bundled/boost-1.49.0/include/boost/thread/xtime.hpp
+++ b/deal.II/bundled/boost-1.49.0/include/boost/thread/xtime.hpp
@@ -20,7 +20,7 @@ namespace boost {
enum xtime_clock_types
{
- TIME_UTC=1
+ TIME_UTC_=1
// TIME_TAI,
// TIME_MONOTONIC,
// TIME_PROCESS,
@@ -68,7 +68,7 @@ inline xtime get_xtime(boost::system_time const& abs_time)
inline int xtime_get(struct xtime* xtp, int clock_type)
{
- if (clock_type == TIME_UTC)
+ if (clock_type == TIME_UTC_)
{
*xtp=get_xtime(get_system_time());
return clock_type;
diff --git a/deal.II/bundled/boost-1.49.0/libs/serialization/src/CMakeLists.txt b/deal.II/bundled/boost-1.49.0/libs/serialization/src/CMakeLists.txt
index 3daeece5c4..b06ba8bd6e 100644
--- a/deal.II/bundled/boost-1.49.0/libs/serialization/src/CMakeLists.txt
+++ b/deal.II/bundled/boost-1.49.0/libs/serialization/src/CMakeLists.txt
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
SET(src_boost_serialization
basic_archive.cpp
diff --git a/deal.II/bundled/boost-1.49.0/libs/thread/example/starvephil.cpp b/deal.II/bundled/boost-1.49.0/libs/thread/example/starvephil.cpp
index 0ef2e0d32d..b37c503498 100644
--- a/deal.II/bundled/boost-1.49.0/libs/thread/example/starvephil.cpp
+++ b/deal.II/bundled/boost-1.49.0/libs/thread/example/starvephil.cpp
@@ -50,7 +50,7 @@ public:
<< "very hot ..." << std::endl;
}
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 3;
boost::thread::sleep(xt);
m_chickens += value;
@@ -85,7 +85,7 @@ void chef()
std::cout << "(" << clock() << ") Chef: cooking ..." << std::endl;
}
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 2;
boost::thread::sleep(xt);
{
@@ -111,7 +111,7 @@ struct phil
if (m_id > 0)
{
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 3;
boost::thread::sleep(xt);
}
diff --git a/deal.II/bundled/boost-1.49.0/libs/thread/example/tennis.cpp b/deal.II/bundled/boost-1.49.0/libs/thread/example/tennis.cpp
index 798f55e5d8..621d0891ce 100644
--- a/deal.II/bundled/boost-1.49.0/libs/thread/example/tennis.cpp
+++ b/deal.II/bundled/boost-1.49.0/libs/thread/example/tennis.cpp
@@ -104,7 +104,7 @@ int main(int argc, char* argv[])
boost::thread thrdb(thread_adapter(&player, (void*)PLAYER_B));
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 1;
boost::thread::sleep(xt);
{
diff --git a/deal.II/bundled/boost-1.49.0/libs/thread/example/thread.cpp b/deal.II/bundled/boost-1.49.0/libs/thread/example/thread.cpp
index c21a3b5ea8..09aa05a0cd 100644
--- a/deal.II/bundled/boost-1.49.0/libs/thread/example/thread.cpp
+++ b/deal.II/bundled/boost-1.49.0/libs/thread/example/thread.cpp
@@ -14,7 +14,7 @@ struct thread_alarm
void operator()()
{
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += m_secs;
boost::thread::sleep(xt);
diff --git a/deal.II/bundled/boost-1.49.0/libs/thread/example/xtime.cpp b/deal.II/bundled/boost-1.49.0/libs/thread/example/xtime.cpp
index a9b1933908..0c4fb7150d 100644
--- a/deal.II/bundled/boost-1.49.0/libs/thread/example/xtime.cpp
+++ b/deal.II/bundled/boost-1.49.0/libs/thread/example/xtime.cpp
@@ -10,7 +10,7 @@
int main(int argc, char* argv[])
{
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 1;
boost::thread::sleep(xt); // Sleep for 1 second
}
diff --git a/deal.II/bundled/boost-1.49.0/libs/thread/src/CMakeLists.txt b/deal.II/bundled/boost-1.49.0/libs/thread/src/CMakeLists.txt
index 7a87dfb931..2e3eb8839f 100644
--- a/deal.II/bundled/boost-1.49.0/libs/thread/src/CMakeLists.txt
+++ b/deal.II/bundled/boost-1.49.0/libs/thread/src/CMakeLists.txt
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
IF(DEAL_II_USE_MT_POSIX)
SET(src_boost_thread
diff --git a/deal.II/bundled/boost-1.49.0/libs/thread/src/pthread/thread.cpp b/deal.II/bundled/boost-1.49.0/libs/thread/src/pthread/thread.cpp
index 07b8458bce..847662b90f 100644
--- a/deal.II/bundled/boost-1.49.0/libs/thread/src/pthread/thread.cpp
+++ b/deal.II/bundled/boost-1.49.0/libs/thread/src/pthread/thread.cpp
@@ -354,7 +354,7 @@ namespace boost
cond.timed_wait(lock, xt);
# endif
xtime cur;
- xtime_get(&cur, TIME_UTC);
+ xtime_get(&cur, TIME_UTC_);
if (xtime_cmp(xt, cur) <= 0)
return;
}
@@ -369,7 +369,7 @@ namespace boost
BOOST_VERIFY(!pthread_yield());
# else
xtime xt;
- xtime_get(&xt, TIME_UTC);
+ xtime_get(&xt, TIME_UTC_);
sleep(xt);
# endif
}
diff --git a/deal.II/bundled/boost-1.49.0/libs/thread/src/pthread/timeconv.inl b/deal.II/bundled/boost-1.49.0/libs/thread/src/pthread/timeconv.inl
index 1c0a0cdca8..cab7c55a78 100644
--- a/deal.II/bundled/boost-1.49.0/libs/thread/src/pthread/timeconv.inl
+++ b/deal.II/bundled/boost-1.49.0/libs/thread/src/pthread/timeconv.inl
@@ -20,8 +20,8 @@ const int NANOSECONDS_PER_MICROSECOND = 1000;
inline void to_time(int milliseconds, boost::xtime& xt)
{
int res = 0;
- res = boost::xtime_get(&xt, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
+ res = boost::xtime_get(&xt, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
@@ -56,8 +56,8 @@ inline void to_timespec_duration(const boost::xtime& xt, timespec& ts)
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
if (boost::xtime_cmp(xt, cur) <= 0)
{
@@ -87,8 +87,8 @@ inline void to_duration(boost::xtime xt, int& milliseconds)
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
if (boost::xtime_cmp(xt, cur) <= 0)
milliseconds = 0;
@@ -109,8 +109,8 @@ inline void to_microduration(boost::xtime xt, int& microseconds)
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
if (boost::xtime_cmp(xt, cur) <= 0)
microseconds = 0;
diff --git a/deal.II/bundled/boost-1.49.0/libs/thread/src/win32/timeconv.inl b/deal.II/bundled/boost-1.49.0/libs/thread/src/win32/timeconv.inl
index 5ec3b1798a..c6467832a7 100644
--- a/deal.II/bundled/boost-1.49.0/libs/thread/src/win32/timeconv.inl
+++ b/deal.II/bundled/boost-1.49.0/libs/thread/src/win32/timeconv.inl
@@ -17,8 +17,8 @@ const int NANOSECONDS_PER_MICROSECOND = 1000;
inline void to_time(int milliseconds, boost::xtime& xt)
{
int res = 0;
- res = boost::xtime_get(&xt, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&xt, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
@@ -54,8 +54,8 @@ inline void to_timespec_duration(const boost::xtime& xt, timespec& ts)
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
if (boost::xtime_cmp(xt, cur) <= 0)
{
@@ -85,8 +85,8 @@ inline void to_duration(boost::xtime xt, int& milliseconds)
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
if (boost::xtime_cmp(xt, cur) <= 0)
milliseconds = 0;
@@ -107,8 +107,8 @@ inline void to_microduration(boost::xtime xt, int& microseconds)
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
if (boost::xtime_cmp(xt, cur) <= 0)
microseconds = 0;
diff --git a/deal.II/bundled/functionparser/CMakeLists.txt b/deal.II/bundled/functionparser/CMakeLists.txt
index 45afe46683..9fb68b95dc 100644
--- a/deal.II/bundled/functionparser/CMakeLists.txt
+++ b/deal.II/bundled/functionparser/CMakeLists.txt
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Remove -Wall and -pedantic from CMAKE_CXX_FLAGS (in directory scope) to
diff --git a/deal.II/bundled/tbb41_20130401oss/src/CMakeLists.txt b/deal.II/bundled/tbb41_20130401oss/src/CMakeLists.txt
index 3d5aa530b7..1551dc14de 100644
--- a/deal.II/bundled/tbb41_20130401oss/src/CMakeLists.txt
+++ b/deal.II/bundled/tbb41_20130401oss/src/CMakeLists.txt
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Remove -Wall and -pedantic from CMAKE_CXX_FLAGS (in directory scope) to
diff --git a/deal.II/bundled/umfpack/AMD/Source/CMakeLists.txt b/deal.II/bundled/umfpack/AMD/Source/CMakeLists.txt
index 9739fd4fe4..5f3231de01 100644
--- a/deal.II/bundled/umfpack/AMD/Source/CMakeLists.txt
+++ b/deal.II/bundled/umfpack/AMD/Source/CMakeLists.txt
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
SET(src_amd
amd_1.cc
diff --git a/deal.II/bundled/umfpack/UMFPACK/Source/CMakeLists.txt b/deal.II/bundled/umfpack/UMFPACK/Source/CMakeLists.txt
index a413a24709..4761b3c041 100644
--- a/deal.II/bundled/umfpack/UMFPACK/Source/CMakeLists.txt
+++ b/deal.II/bundled/umfpack/UMFPACK/Source/CMakeLists.txt
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Logic copied from the distributed UMFPACK Makefile.
diff --git a/deal.II/cmake/TODO.CMAKE b/deal.II/cmake/TODO.CMAKE
deleted file mode 100644
index 944e639e52..0000000000
--- a/deal.II/cmake/TODO.CMAKE
+++ /dev/null
@@ -1,7 +0,0 @@
-Some last bits and thoughts:
-
-* A TECPLOT feature has to be written
-
-* Support debug;optimized;general for all FEATURES
-
-* document that we no longer need the two-lib installation of p4est
diff --git a/deal.II/cmake/checks/check_01_compiler_features.cmake b/deal.II/cmake/checks/check_01_compiler_features.cmake
index 17063b529e..c6678d6367 100644
--- a/deal.II/cmake/checks/check_01_compiler_features.cmake
+++ b/deal.II/cmake/checks/check_01_compiler_features.cmake
@@ -1,20 +1,24 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-#####
+## ---------------------------------------------------------------------
-###########################################################################
-# #
-# Check for various compiler features: #
-# #
-###########################################################################
+########################################################################
+# #
+# Check for various compiler features: #
+# #
+########################################################################
#
# This file sets up:
@@ -148,8 +152,8 @@ CHECK_CXX_SOURCE_COMPILES(
"
HAVE_GLIBC_STACKTRACE)
-IF(HAVE_GLIBC_STACKTRACE)
- ENABLE_IF_SUPPORTED(CMAKE_SHARED_LINKER_FLAGS "-rdynamic")
+IF(HAVE_GLIBC_STACKTRACE AND NOT DEAL_II_STATIC_EXECUTABLE)
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-rdynamic")
ENDIF()
diff --git a/deal.II/cmake/checks/check_01_cpu_features.cmake b/deal.II/cmake/checks/check_01_cpu_features.cmake
index 81ac8f6a2e..9639b89497 100644
--- a/deal.II/cmake/checks/check_01_cpu_features.cmake
+++ b/deal.II/cmake/checks/check_01_cpu_features.cmake
@@ -1,23 +1,25 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
-###########################################################################
-# #
-# Platform and CPU specific tests: #
-# #
-###########################################################################
+########################################################################
+# #
+# Platform and CPU specific tests: #
+# #
+########################################################################
#
# This file sets up
@@ -37,19 +39,21 @@
#
# Determine the Endianess of the platform:
#
-INCLUDE(TestBigEndian)
-TEST_BIG_ENDIAN(DEAL_II_WORDS_BIGENDIAN)
-
-
-IF(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
+IF(CMAKE_C_COMPILER_WORKS)
+ INCLUDE(TestBigEndian)
- #
- # 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}")
+ 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)
#
# Take care that the following tests are rerun if CMAKE_REQUIRED_FLAGS
# changes..
@@ -135,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)
@@ -148,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_01_cxx_features.cmake b/deal.II/cmake/checks/check_01_cxx_features.cmake
index 374d296e36..7fcf064bfb 100644
--- a/deal.II/cmake/checks/check_01_cxx_features.cmake
+++ b/deal.II/cmake/checks/check_01_cxx_features.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Check for various C++ language features
@@ -26,11 +28,11 @@
#
-###########################################################################
-# #
-# C++11 Support: #
-# #
-###########################################################################
+########################################################################
+# #
+# C++11 Support: #
+# #
+########################################################################
#
# See if there is a compiler flag to enable C++11 features
@@ -219,11 +221,11 @@ ELSE()
ENDIF()
-###########################################################################
-# #
-# Check for various C++ features: #
-# #
-###########################################################################
+########################################################################
+# #
+# Check for various C++ features: #
+# #
+########################################################################
CHECK_CXX_SOURCE_COMPILES(
"
diff --git a/deal.II/cmake/checks/check_02_system_features.cmake b/deal.II/cmake/checks/check_02_system_features.cmake
index 4288bff50b..22e6a8a88b 100644
--- a/deal.II/cmake/checks/check_02_system_features.cmake
+++ b/deal.II/cmake/checks/check_02_system_features.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# This file sets up:
@@ -29,11 +31,11 @@
#
-###########################################################################
-# #
-# POSIX and Linux specific tests: #
-# #
-###########################################################################
+########################################################################
+# #
+# POSIX and Linux specific tests: #
+# #
+########################################################################
#
# Check for various posix (and linux) specific header files and symbols
@@ -56,24 +58,30 @@ CHECK_CXX_SYMBOL_EXISTS("rand_r" "stdlib.h" HAVE_RAND_R)
#
# Do we have the Bessel function jn?
#
-FIND_LIBRARY(m_lib NAMES m)
-MARK_AS_ADVANCED(m_lib)
+# 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()
+FIND_LIBRARY(m_LIBRARY NAMES m)
+SWITCH_LIBRARY_PREFERENCE()
+MARK_AS_ADVANCED(m_LIBRARY)
-IF(NOT m_lib MATCHES "-NOTFOUND")
- SET(CMAKE_REQUIRED_LIBRARIES ${m_lib})
+IF(NOT m_LIBRARY MATCHES "-NOTFOUND")
+ 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_lib})
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${m_LIBRARY})
ENDIF()
ENDIF()
-###########################################################################
-# #
-# Mac OSX specific setup: #
-# #
-###########################################################################
+########################################################################
+# #
+# Mac OSX specific setup: #
+# #
+########################################################################
IF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
#
@@ -90,16 +98,16 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
#
# TODO: MM: Check whether this is still necessary...
#
- STRIP_FLAG(CMAKE_SHARED_LINKER_FLAGS "-rdynamic")
+ STRIP_FLAG(DEAL_II_LINKER_FLAGS "-rdynamic")
ENDIF()
-###########################################################################
-# #
-# Windows and CYGWIN specific setup: #
-# #
-###########################################################################
+########################################################################
+# #
+# Windows and CYGWIN specific setup: #
+# #
+########################################################################
IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
#
@@ -108,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
@@ -122,11 +150,12 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
# - Matthias Maier, 2012
#
STRIP_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-ggdb")
- STRIP_FLAG(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-ggdb")
+ STRIP_FLAG(DEAL_II_LINKER_FLAGS_DEBUG "-ggdb")
STRIP_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-g")
- STRIP_FLAG(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-g")
+ 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
@@ -135,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 3978679979..bb63ba0740 100644
--- a/deal.II/cmake/checks/check_03_compiler_bugs.cmake
+++ b/deal.II/cmake/checks/check_03_compiler_bugs.cmake
@@ -1,57 +1,24 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-#####
+## ---------------------------------------------------------------------
-###########################################################################
-# #
-# Check for various compiler bugs: #
-# #
-###########################################################################
-
-
-#
-# 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
- )
+########################################################################
+# #
+# Check for various compiler bugs: #
+# #
+########################################################################
#
@@ -96,38 +63,6 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
ENDIF()
-#
-# Some gcc compiler versions have a problem when using an unsigned count
-# in the std::advance function. Unfortunately, this also happens
-# occasionally from within the standard library, so we can't prevent the
-# warning messages. Since this is annoying, switch of the flag -W which
-# causes this.
-#
-# - Matthias Maier, rewritten 2012
-#
-
-# TODO: We use the mpi.h header file for this check. We should test this
-# bug directly...
-CHECK_INCLUDE_FILE_CXX("mpi.h" HAVE_MPI_H)
-
-IF(HAVE_MPI_H)
- PUSH_TEST_FLAG("-Wunused-parameter")
- PUSH_TEST_FLAG("-Werror")
- CHECK_CXX_COMPILER_BUG(
- "
- #include
- int main() { return 0; }
- "
- DEAL_II_ADVANCE_WARNING_BUG)
- POP_TEST_FLAG()
- POP_TEST_FLAG()
-
- IF(DEAL_II_ADVANCE_WARNING_BUG)
- ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused-parameter")
- ENDIF()
-ENDIF()
-
-
#
# In some cases, we would like to name partial specializations
# as friends. However, the standard forbids us to do so. But
diff --git a/deal.II/cmake/config/CMakeLists.txt b/deal.II/cmake/config/CMakeLists.txt
index 02780e6ed2..48cf9f0c92 100644
--- a/deal.II/cmake/config/CMakeLists.txt
+++ b/deal.II/cmake/config/CMakeLists.txt
@@ -1,34 +1,61 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
+#
+# This file sets up the project configuration consisting of
+#
+# Make.global_options (legacy)
+# deal.IIConfig.cmake
+# deal.IIVersionConfig.cmake
+#
+# and copies it (a) to the build directory and (b) prepares it for later
+# installation (the copy in CMAKE_CURRENT_BINARY_DIR).
+#
+
+#
+# Read in auxiliary include directories for the build directory
+# configuration:
+#
+FILE(STRINGS
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_source_includes
+ deal_ii_source_includes
+ )
#
# Configure the template-arguments file
#
-CONFIGURE_FILE(
+CONFIGURE_FILE( # for binary dir:
${CMAKE_CURRENT_SOURCE_DIR}/template-arguments.in
- ${CMAKE_CURRENT_BINARY_DIR}/template-arguments
+ ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/template-arguments
)
-###########################################################################
-# #
-# Setup and install the convenience macros: #
-# #
-###########################################################################
+########################################################################
+# #
+# Setup and install the convenience macros: #
+# #
+########################################################################
-INSTALL(FILES
+FILE(COPY # for binary dir:
+ ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake
+ ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
+ ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_setup_target.cmake
+ DESTINATION ${CMAKE_BINARY_DIR}/${DEAL_II_CMAKE_MACROS_RELDIR}
+ )
+INSTALL(FILES # for installation:
${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake
${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_setup_target.cmake
@@ -37,11 +64,11 @@ INSTALL(FILES
)
-###########################################################################
-# #
-# Configure and install the cmake project configuration: #
-# #
-###########################################################################
+########################################################################
+# #
+# Configure and install the cmake project configuration: #
+# #
+########################################################################
#
# Strip -Wno-deprecated from CMAKE_CXX_FLAGS so that deprecation warnings
@@ -74,12 +101,12 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES})
SET(CONFIG_LIBRARIES_${_build}
\${DEAL_II_PATH}/\${DEAL_II_LIBRARY_RELDIR}/${CONFIG_LIBRARY_${_build}}
- ${DEAL_II_EXTERNAL_LIBRARIES}
${DEAL_II_EXTERNAL_LIBRARIES_${_build}}
+ ${DEAL_II_EXTERNAL_LIBRARIES}
)
LIST(APPEND CONFIG_LIBRARIES
${_keyword}
- ${CONFIG_LIBRARIES_${_build}}
+ \${DEAL_II_LIBRARIES_${_build}}
)
SET(CONFIG_TARGET_${_build}
@@ -87,28 +114,41 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES})
)
LIST(APPEND CONFIG_TARGET
${_keyword}
- ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}
+ \${DEAL_II_TARGET_${_build}}
)
ENDFOREACH()
-SET(CONFIG_INCLUDE_DIRS
+#
+# For binary dir:
+#
+SET(CONFIG_INCLUDE_DIRS_BINARY
+ \${DEAL_II_PATH}/include
+ \${DEAL_II_PATH}/include/deal.II
+ ${CMAKE_SOURCE_DIR}/include/
+ ${CMAKE_SOURCE_DIR}/include/deal.II
+ ${deal_ii_source_includes}
+ ${DEAL_II_USER_INCLUDE_DIRS}
+ )
+#
+# For installation:
+#
+SET(CONFIG_INCLUDE_DIRS_INSTALLATION
\${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR}
\${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR}/deal.II
\${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled
${DEAL_II_USER_INCLUDE_DIRS}
)
-
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
+ ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
@ONLY
)
-
#
# Append feature configuration:
#
-
-SET(_file ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake)
+SET(_file
+ ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
+ )
FILE(APPEND ${_file}
"\n\n#\n# Feature configuration:\n#\n\n"
)
@@ -121,26 +161,25 @@ FOREACH(var ${res})
ENDIF()
ENDFOREACH()
-
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/ConfigVersion.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake
+ ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake
@ONLY
)
INSTALL(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake
+ ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
+ ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake
DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
COMPONENT library
)
-###########################################################################
-# #
-# Configure and install the old Makefile configuration: #
-# #
-###########################################################################
+########################################################################
+# #
+# Configure and install the old Makefile configuration: #
+# #
+########################################################################
IF(DEAL_II_COMPONENT_COMPAT_FILES)
@@ -148,13 +187,6 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
# Transform some cmake lists into a string that the old Makefile
# mechanism actually understands:
#
- TO_STRING_AND_ADD_PREFIX(MAKEFILE_INCLUDE_DIRS "${CMAKE_INCLUDE_FLAG_CXX}"
- $(D)/${DEAL_II_INCLUDE_RELDIR}
- $(D)/${DEAL_II_INCLUDE_RELDIR}/deal.II
- $(D)/${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled
- ${DEAL_II_USER_INCLUDE_DIRS}
- ${DEAL_II_INCLUDE_DIRS}
- )
FOREACH(build ${DEAL_II_BUILD_TYPES})
TO_STRING_AND_ADD_PREFIX(MAKEFILE_DEFINITIONS_${build}
@@ -170,8 +202,8 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
#
SET(_libs)
FOREACH(_lib
- ${DEAL_II_EXTERNAL_LIBRARIES}
${DEAL_II_EXTERNAL_LIBRARIES_${build}}
+ ${DEAL_II_EXTERNAL_LIBRARIES}
)
IF(_lib MATCHES "^/")
LIST(APPEND _libs "${_lib}")
@@ -186,8 +218,8 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
SET(_paths)
FOREACH(_lib
$(D)/${DEAL_II_LIBRARY_RELDIR}/${CONFIG_LIBRARY_${build}}
- ${DEAL_II_EXTERNAL_LIBRARIES}
${DEAL_II_EXTERNAL_LIBRARIES_${build}}
+ ${DEAL_II_EXTERNAL_LIBRARIES}
)
LIST(APPEND MAKEFILE_LIBS_${build} ${_lib})
#
@@ -214,7 +246,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
# Set up our linker flags:
#
SET(MAKEFILE_LDFLAGS_${build}
- "${CMAKE_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}} ${CMAKE_SHARED_LINKER_FLAGS} ${DEAL_II_SHARED_LINKER_FLAGS_${build}}"
+ "${CMAKE_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}} ${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${build}}"
)
ENDFOREACH()
@@ -222,7 +254,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
# Boilerplate: The Make.global_options expects variables to be set to
# yes, as is common for Makefiles.
#
- COND_SET_TO_YES(DEAL_II_WITH_TBB MAKEFILE_enablethreads)
+ COND_SET_TO_YES(DEAL_II_WITH_THREADS MAKEFILE_enablethreads)
COND_SET_TO_YES(DEAL_II_WITH_FUNCTIONPARSER MAKEFILE_enableparser)
COND_SET_TO_YES(BUILD_SHARED_LIBS MAKEFILE_enableshared)
@@ -239,16 +271,62 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
COND_SET_TO_YES(DEAL_II_WITH_P4EST MAKEFILE_P4EST)
COND_SET_TO_YES(DEAL_II_WITH_MPI MAKEFILE_MPI)
+ #
+ # For binary dir:
+ #
+ SET(MAKEFILE_D_BINARY ${CMAKE_BINARY_DIR})
+ TO_STRING_AND_ADD_PREFIX(MAKEFILE_INCLUDE_DIRS_BINARY "${CMAKE_INCLUDE_FLAG_CXX}"
+ $(D)/install
+ $(D)/install/deal.II
+ ${CMAKE_SOURCE_DIR}/include/
+ ${CMAKE_SOURCE_DIR}/include/deal.II
+ ${deal_ii_source_includes}
+ ${DEAL_II_USER_INCLUDE_DIRS}
+ )
+ #
+ # For installation:
+ #
+ SET(MAKEFILE_D_INSTALLATION ${CMAKE_INSTALL_PREFIX})
+ TO_STRING_AND_ADD_PREFIX(MAKEFILE_INCLUDE_DIRS_INSTALLATION "${CMAKE_INCLUDE_FLAG_CXX}"
+ $(D)/${DEAL_II_INCLUDE_RELDIR}
+ $(D)/${DEAL_II_INCLUDE_RELDIR}/deal.II
+ $(D)/${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled
+ ${DEAL_II_USER_INCLUDE_DIRS}
+ )
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in
- ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
+ ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/Make.global_options
)
INSTALL(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/template-arguments
- ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
+ ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/template-arguments
+ ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/Make.global_options
DESTINATION ${DEAL_II_COMMON_RELDIR}
COMPONENT compat_files
)
ENDIF()
+#
+# Finally, add a target to create the "binary" file in
+# ${DEAL_II_PROJECT_CONFIG_RELDIR} and add it to the library target:
+#
+ADD_CUSTOM_TARGET(setup_build_dir ALL
+ COMMAND ${CMAKE_COMMAND} -E touch
+ ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/binary
+ COMMAND ${CMAKE_COMMAND} -E touch
+ ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
+ )
+ADD_DEPENDENCIES(library setup_build_dir)
+
+#
+# And a script to remove it upon installation from the install prefix:
+#
+INSTALL(CODE
+ "
+ FILE(REMOVE ${CMAKE_INSTALL_PREFIX}/${DEAL_II_PROJECT_CONFIG_RELDIR}/binary)
+ EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E touch
+ ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
+ )
+ "
+ COMPONENT library
+ )
diff --git a/deal.II/cmake/config/Config.cmake.in b/deal.II/cmake/config/Config.cmake.in
index c28eb39495..53417f2bdf 100644
--- a/deal.II/cmake/config/Config.cmake.in
+++ b/deal.II/cmake/config/Config.cmake.in
@@ -1,23 +1,25 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
-##########################################################################
-## ##
-## The deal.II project configuration file ##
-## ##
-##########################################################################
+########################################################################
+## ##
+## The deal.II project configuration file ##
+## ##
+########################################################################
#
@@ -64,6 +66,14 @@ WHILE(NOT "${_path}" STREQUAL "")
GET_FILENAME_COMPONENT(_path "${_path}" PATH)
ENDWHILE()
+#
+# Is this project reside in a build directory or at an installed location?
+#
+
+IF(EXISTS ${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/binary)
+ SET(DEAL_II_BUILD_DIR TRUE)
+ENDIF()
+
#
# Print a message after inclusion of this file:
#
@@ -71,9 +81,15 @@ ENDWHILE()
SET(DEAL_II_PROJECT_CONFIG_INCLUDED TRUE)
IF(NOT ${DEAL_II_PACKAGE_NAME}_FIND_QUIETLY)
- MESSAGE(STATUS
- "Using the ${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION} installation found at ${DEAL_II_PATH}"
- )
+ IF(DEAL_II_BUILD_DIR)
+ MESSAGE(STATUS
+ "Using the ${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION} build directory found at ${DEAL_II_PATH}"
+ )
+ ELSE()
+ MESSAGE(STATUS
+ "Using the ${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION} installation found at ${DEAL_II_PATH}"
+ )
+ ENDIF()
ENDIF()
@@ -108,13 +124,13 @@ SET(DEAL_II_CXX_FLAGS_DEBUG "@DEAL_II_CXX_FLAGS_DEBUG@")
SET(DEAL_II_CXX_FLAGS_RELEASE "@DEAL_II_CXX_FLAGS_RELEASE@")
# used for all targets:
-SET(DEAL_II_LINKER_FLAGS "@CMAKE_SHARED_LINKER_FLAGS@")
+SET(DEAL_II_LINKER_FLAGS "@DEAL_II_LINKER_FLAGS@")
# _additionally_ used for debug targets:
-SET(DEAL_II_LINKER_FLAGS_DEBUG "@DEAL_II_SHARED_LINKER_FLAGS_DEBUG@")
+SET(DEAL_II_LINKER_FLAGS_DEBUG "@DEAL_II_LINKER_FLAGS_DEBUG@")
# _additionally_ used for release targets:
-SET(DEAL_II_LINKER_FLAGS_RELEASE "@DEAL_II_SHARED_LINKER_FLAGS_RELEASE@")
+SET(DEAL_II_LINKER_FLAGS_RELEASE "@DEAL_II_LINKER_FLAGS_RELEASE@")
# used for all targets:
SET(DEAL_II_USER_DEFINITIONS "@DEAL_II_USER_DEFINITIONS@")
@@ -127,10 +143,20 @@ SET(DEAL_II_USER_DEFINITIONS_RELEASE "@DEAL_II_USER_DEFINITIONS_RELEASE@")
#
-# Information about include directories and libraries
+# Build a static executable:
#
-SET(DEAL_II_INCLUDE_DIRS "@CONFIG_INCLUDE_DIRS@")
+SET(DEAL_II_STATIC_EXECUTABLE "@DEAL_II_STATIC_EXECUTABLE@")
+
+
+#
+# Information about include directories and libraries
+#
+IF(DEAL_II_BUILD_DIR)
+ SET(DEAL_II_INCLUDE_DIRS "@CONFIG_INCLUDE_DIRS_BINARY@")
+ELSE()
+ SET(DEAL_II_INCLUDE_DIRS "@CONFIG_INCLUDE_DIRS_INSTALLATION@")
+ENDIF()
# Full list of libraries for the debug target:
SET(DEAL_II_LIBRARIES_DEBUG "@CONFIG_LIBRARIES_DEBUG@")
@@ -146,7 +172,11 @@ SET(DEAL_II_LIBRARIES "@CONFIG_LIBRARIES@")
# Information about library targets
#
-SET(DEAL_II_TARGET_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake")
+IF(DEAL_II_BUILD_DIR)
+ SET(DEAL_II_TARGET_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}BuildTargets.cmake")
+ELSE()
+ SET(DEAL_II_TARGET_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake")
+ENDIF()
# The Debug target:
SET(DEAL_II_TARGET_DEBUG "@CONFIG_TARGET_DEBUG@")
diff --git a/deal.II/cmake/config/Make.global_options.in b/deal.II/cmake/config/Make.global_options.in
index bcedebb257..3ebd2f232a 100644
--- a/deal.II/cmake/config/Make.global_options.in
+++ b/deal.II/cmake/config/Make.global_options.in
@@ -1,23 +1,34 @@
-# $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@
+
+ifeq ($(wildcard $(D)/@DEAL_II_PROJECT_CONFIG_RELDIR@/binary),)
+ D = @MAKEFILE_D_INSTALLATION@
+else
+ D = @MAKEFILE_D_BINARY@
+endif
+
CXX = @CMAKE_CXX_COMPILER@
CXX-ID = @CMAKE_CXX_COMPILER_ID@
CXX-VERSION = @CMAKE_CXX_COMPILER_VERSION@
@@ -60,17 +71,27 @@ DEAL_II_USE_MPI = @MAKEFILE_MPI@
OBJEXT = o
EXEEXT =
+shared-lib-suffix = .so
+static-lib-suffix = .a
+
+ifeq ($(enable-shared),yes)
+ lib-suffix = $(shared-lib-suffix)
+else
+ lib-suffix = $(static-lib-suffix)
+endif
+
# 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
+ifeq ($(wildcard $(D)/@DEAL_II_PROJECT_CONFIG_RELDIR@/binary),)
+ INCLUDE = @MAKEFILE_INCLUDE_DIRS_INSTALLATION@
+else
+ INCLUDE = @MAKEFILE_INCLUDE_DIRS_BINARY@
+endif
# 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 6445f6b1f1..7c64e0dbe9 100644
--- a/deal.II/cmake/configure/configure_1_lapack.cmake
+++ b/deal.II/cmake/configure/configure_1_lapack.cmake
@@ -1,36 +1,27 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for the lapack library:
#
MACRO(FEATURE_LAPACK_FIND_EXTERNAL var)
- FIND_PACKAGE(LAPACK)
+ FIND_PACKAGE(DEALII_LAPACK)
IF(LAPACK_FOUND)
- MARK_AS_ADVANCED(
- atlas_LIBRARY
- blas_LIBRARY
- gslcblas_LIBRARY
- lapack_LIBRARY
- m_LIBRARY
- ptf77blas_LIBRARY
- ptlapack_LIBRARY
- refblas_LIBRARY
- reflapack_LIBRARY
- )
SET(${var} TRUE)
ENDIF()
ENDMACRO()
@@ -51,25 +42,32 @@ 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})
#
- # For some static lapack versions it is necessary to link with -lm.
- # So link with it as well if -lm is already present in our link
- # interface:
+ # Push -pthread as well:
#
- IF(NOT m_lib MATCHES "-NOTFOUND")
- LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${m_lib})
+ ENABLE_IF_SUPPORTED(CMAKE_REQUIRED_FLAGS "-pthread")
+
+ IF(CMAKE_C_COMPILER_WORKS)
+ FOREACH(_func ${DEAL_II_LAPACK_FUNCTIONS})
+ STRING(TOUPPER ${_func} _func_uppercase)
+ CHECK_FUNCTION_EXISTS(${_func} HAVE_${_func_uppercase})
+ ENDFOREACH()
+ ELSE()
+ MESSAGE(STATUS
+ "No suitable C compiler was found! Skipping LAPACK symbol check."
+ )
+ FOREACH(_func ${DEAL_II_LAPACK_FUNCTIONS})
+ SET_IF_EMPTY(HAVE_${_func_uppercase} TRUE)
+ ENDFOREACH()
ENDIF()
- ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
-
- FOREACH(_func ${DEAL_II_LAPACK_FUNCTIONS})
- STRING(TOUPPER ${_func} _func_uppercase)
- CHECK_FUNCTION_EXISTS(${_func} HAVE_${_func_uppercase})
- ENDFOREACH()
-
- SET(CMAKE_REQUIRED_LIBRARIES)
- STRIP_FLAG(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
+ RESET_CMAKE_REQUIRED()
ENDMACRO()
@@ -81,28 +79,11 @@ MACRO(RESET_LAPACK_FUNCTIONS_CACHE)
ENDMACRO()
-MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL)
- #
- # 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()
- ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${LAPACK_LINKER_FLAGS}")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${LAPACK_LIBRARIES})
+MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL)
+ ADD_FLAGS(DEAL_II_LINKER_FLAGS "${LAPACK_LINKER_FLAGS}")
+ DEAL_II_APPEND_LIBRARIES(${LAPACK_LIBRARIES})
CHECK_FOR_LAPACK_FUNCTIONS()
ENDMACRO()
diff --git a/deal.II/cmake/configure/configure_1_mpi.cmake b/deal.II/cmake/configure/configure_1_mpi.cmake
index e0c1766d41..5140848840 100644
--- a/deal.II/cmake/configure/configure_1_mpi.cmake
+++ b/deal.II/cmake/configure/configure_1_mpi.cmake
@@ -1,20 +1,25 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for mpi support:
#
+# We look for the C and Fortran libraries as well because they are needed
+# by some external libraries:
+#
MACRO(FEATURE_MPI_FIND_EXTERNAL var)
#
@@ -31,7 +36,22 @@ MACRO(FEATURE_MPI_FIND_EXTERNAL var)
# directly.
#
SET_IF_EMPTY(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
- SET_IF_EMPTY(MPI_C_COMPILER ${CMAKE_C_COMPILER}) # for good measure
+ IF(CMAKE_C_COMPILER_WORKS)
+ SET_IF_EMPTY(MPI_C_COMPILER ${CMAKE_C_COMPILER}) # for good measure
+ ELSE()
+ MESSAGE(STATUS
+ "No suitable C compiler was found! MPI C interface can not be "
+ "autodetected"
+ )
+ ENDIF()
+ IF(CMAKE_Fortran_COMPILER_WORKS)
+ SET_IF_EMPTY(MPI_Fortran_COMPILER ${CMAKE_Fortran_COMPILER}) # for good measure
+ ELSE()
+ MESSAGE(STATUS
+ "No suitable Fortran compiler was found! MPI Fortran interface can "
+ "not be autodetected"
+ )
+ ENDIF()
FIND_PACKAGE(MPI)
IF(NOT MPI_CXX_FOUND)
@@ -48,14 +68,24 @@ MACRO(FEATURE_MPI_FIND_EXTERNAL var)
SET(MPI_FOUND) # clear this value so that FIND_PACKAGE runs again.
UNSET(MPI_CXX_COMPILER CACHE)
UNSET(MPI_C_COMPILER CACHE)
+ UNSET(MPI_Fortran_COMPILER CACHE)
FIND_PACKAGE(MPI)
ENDIF()
ENDIF()
- IF(MPI_CXX_FOUND)
- # Hide some variables:
- MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY MPI_LIBRARY)
+ #
+ # Manually clean up variables:
+ #
+ FOREACH(_lang C CXX Fortran)
+ IF(MPI_${_lang}_LIBRARIES MATCHES "-NOTFOUND")
+ SET(MPI_${_lang}_LIBRARIES)
+ ENDIF()
+ ENDFOREACH()
+ # Hide some variables:
+ MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY MPI_LIBRARY)
+
+ IF(MPI_CXX_FOUND)
SET(${var} TRUE)
ENDIF()
ENDMACRO()
@@ -63,9 +93,9 @@ ENDMACRO()
MACRO(FEATURE_MPI_CONFIGURE_EXTERNAL)
ADD_FLAGS(CMAKE_CXX_FLAGS "${MPI_CXX_COMPILE_FLAGS}")
- ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${MPI_CXX_LINK_FLAGS}")
+ ADD_FLAGS(DEAL_II_LINKER_FLAGS "${MPI_CXX_LINK_FLAGS}")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${MPI_CXX_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${MPI_CXX_LIBRARIES})
INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
# The user has to know the location of the mpi headers as well:
@@ -77,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 f2df405156..e6ddef4076 100644
--- a/deal.II/cmake/configure/configure_1_threads.cmake
+++ b/deal.II/cmake/configure/configure_1_threads.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
@@ -24,10 +26,46 @@
# The macro will be included in CONFIGURE_FEATURE_THREADS_EXTERNAL/BUNDLED.
#
MACRO(SETUP_THREADING)
- FIND_PACKAGE(Threads)
+ #
+ # Unfortunately the FindThreads macro needs a working C compiler
+ #
+ IF(CMAKE_C_COMPILER_WORKS)
+ #
+ # 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()
+
+ #
+ # 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()
+
+ #
+ # We have no way to query for thread support. Just assume that it is
+ # provided by Pthreads...
+ #
+ MESSAGE(STATUS
+ "No suitable C compiler was found! Assuming threading is provided by Pthreads."
+ )
+ SET_IF_EMPTY(Threads_FOUND TRUE)
+ SET_IF_EMPTY(CMAKE_THREAD_LIBS_INIT "-lpthread")
+ SET_IF_EMPTY(CMAKE_USE_PTHREADS_INIT TRUE)
+ ENDIF()
IF(NOT Threads_FOUND)
- # TODO:
+ #
+ # TODO: This is a dead end. Threading might be setup with internal TBB
+ # so we have no way of returning unsuccessfully...
+ #
MESSAGE(FATAL_ERROR
"\nInternal configuration error: No Threading support found\n\n"
)
@@ -50,7 +88,7 @@ MACRO(SETUP_THREADING)
ENDIF()
ENDIF()
- ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
+ ADD_FLAGS(DEAL_II_LINKER_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
#
# Set up some posix thread specific configuration toggles:
@@ -82,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()
@@ -115,7 +153,7 @@ ENDMACRO()
MACRO(FEATURE_THREADS_CONFIGURE_EXTERNAL)
INCLUDE_DIRECTORIES(${TBB_INCLUDE_DIR})
- SPLIT_DEBUG_RELEASE(_tbb_debug _tbb_release ${TBB_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${TBB_LIBRARIES})
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
IF(TBB_WITH_DEBUG_LIB)
@@ -124,26 +162,13 @@ MACRO(FEATURE_THREADS_CONFIGURE_EXTERNAL)
)
ENDIF()
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG ${_tbb_debug})
ENDIF()
- IF(CMAKE_BUILD_TYPE MATCHES "Release")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_RELEASE ${_tbb_release})
- ENDIF()
SETUP_THREADING()
ENDMACRO()
-#
-# Resolve a cache invalidation problem by searching for these flags
-# unconditionally. They're used in FEATURE_THREADS_CONFIGURE_BUNDLED
-# depending on cached variables.
-#
-ENABLE_IF_SUPPORTED(_dummy "-Wno-parentheses")
-ENABLE_IF_SUPPORTED(_dummy "-Wno-long-long")
-
-
MACRO(FEATURE_THREADS_CONFIGURE_BUNDLED)
#
# Setup threading (before configuring our build...)
@@ -168,10 +193,10 @@ MACRO(FEATURE_THREADS_CONFIGURE_BUNDLED)
#
# tbb uses dlopen/dlclose, so link against libdl.so as well:
#
- FIND_LIBRARY(dl_lib NAMES dl)
- MARK_AS_ADVANCED(dl_lib)
- IF(NOT dl_lib MATCHES "-NOTFOUND")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${dl_lib})
+ FIND_LIBRARY(dl_LIBRARY NAMES dl)
+ MARK_AS_ADVANCED(dl_LIBRARY)
+ IF(NOT dl_LIBRARY MATCHES "-NOTFOUND")
+ DEAL_II_APPEND_LIBRARIES(${dl_LIBRARY})
ENDIF()
INCLUDE_DIRECTORIES(${TBB_FOLDER}/include)
diff --git a/deal.II/cmake/configure/configure_1_umfpack.cmake b/deal.II/cmake/configure/configure_1_umfpack.cmake
index 0d8ebde0d4..56ac7e323d 100644
--- a/deal.II/cmake/configure/configure_1_umfpack.cmake
+++ b/deal.II/cmake/configure/configure_1_umfpack.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for the umfpack library:
diff --git a/deal.II/cmake/configure/configure_2_metis.cmake b/deal.II/cmake/configure/configure_2_metis.cmake
new file mode 100644
index 0000000000..1a49a2c7c2
--- /dev/null
+++ b/deal.II/cmake/configure/configure_2_metis.cmake
@@ -0,0 +1,46 @@
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2012 - 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 metis library:
+#
+
+MACRO(FEATURE_METIS_FIND_EXTERNAL var)
+ FIND_PACKAGE(METIS)
+
+ IF(METIS_FOUND)
+ IF(METIS_VERSION_MAJOR GREATER 4)
+ SET(${var} TRUE)
+ ELSE()
+ MESSAGE(STATUS "Insufficient metis installation found: "
+ "Version 5.x required!"
+ )
+ SET(METIS_ADDITIONAL_ERROR_STRING
+ "Could not find a sufficient modern metis installation: "
+ "Version 5.x required!\n"
+ )
+
+ UNSET(METIS_LIBRARY CACHE)
+ UNSET(METIS_INCLUDE_DIR CACHE)
+ SET(METIS_DIR "" CACHE PATH
+ "An optional hint to a metis directory"
+ )
+ MARK_AS_ADVANCED(CLEAR METIS_DIR)
+ ENDIF()
+ ENDIF()
+ENDMACRO()
+
+CONFIGURE_FEATURE(METIS)
diff --git a/deal.II/cmake/configure/configure_petsc.cmake b/deal.II/cmake/configure/configure_2_petsc.cmake
similarity index 86%
rename from deal.II/cmake/configure/configure_petsc.cmake
rename to deal.II/cmake/configure/configure_2_petsc.cmake
index a7d8d6d626..23465a2eb0 100644
--- a/deal.II/cmake/configure/configure_petsc.cmake
+++ b/deal.II/cmake/configure/configure_2_petsc.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for the petsc library:
@@ -102,25 +104,19 @@ MACRO(FEATURE_PETSC_FIND_EXTERNAL var)
SET(PETSC_ARCH "" CACHE STRING
"An optional hint to a PETSc arch"
)
+ MARK_AS_ADVANCED(CLEAR PETSC_DIR PETSC_ARCH)
ENDIF()
ENDIF()
ENDMACRO()
-#
-# Resolve a cache invalidation problem by searching for this flag
-# unconditionally. It is used in FEATURE_PETSC_CONFIGURE_EXTERNAL
-# depending on cached variables.
-#
-ENABLE_IF_SUPPORTED(_dummy "-Wno-long-long")
-
MACRO(FEATURE_PETSC_CONFIGURE_EXTERNAL)
INCLUDE_DIRECTORIES(${PETSC_INCLUDE_DIRS})
# The user has to know the location of the petsc headers as well:
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${PETSC_INCLUDE_DIRS})
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${PETSC_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${PETSC_LIBRARIES})
#
# Disable a bunch of warnings when compiling with petsc:
diff --git a/deal.II/cmake/configure/configure_trilinos.cmake b/deal.II/cmake/configure/configure_2_trilinos.cmake
similarity index 69%
rename from deal.II/cmake/configure/configure_trilinos.cmake
rename to deal.II/cmake/configure/configure_2_trilinos.cmake
index d7e08f752f..ac15b34051 100644
--- a/deal.II/cmake/configure/configure_trilinos.cmake
+++ b/deal.II/cmake/configure/configure_2_trilinos.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for the trilinos library:
@@ -129,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
@@ -141,110 +143,64 @@ 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(DEAL_II_CAN_USE_CXX11 AND NOT TRILINOS_SUPPORTS_CPP11)
- 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()
+ 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()
-
- 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)
ENDIF()
ENDIF(TRILINOS_FOUND)
-ENDMACRO()
+ IF(NOT ${var})
+ UNSET(TRILINOS_CONFIG CACHE)
+ SET(TRILINOS_DIR "" CACHE STRING
+ "An optional hint to a Trilinos installation"
+ )
+ MARK_AS_ADVANCED(CLEAR TRILINOS_DIR)
+ ENDIF()
+
+ENDMACRO()
-#
-# Resolve a cache invalidation problem by searching for these flags
-# unconditionally. They're used in FEATURE_TRILINOS_CONFIGURE_EXTERNAL
-# depending on cached variables.
-#
-ENABLE_IF_SUPPORTED(_dummy "-Wno-unused")
-ENABLE_IF_SUPPORTED(_dummy "-Wno-extra")
-ENABLE_IF_SUPPORTED(_dummy "-Wno-overloaded-virtual")
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})
# The user has to know the location of the trilinos headers as well:
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${TRILINOS_INCLUDE_DIRS})
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
- # The Trilinos libraries:
- ${TRILINOS_LIBRARIES}
- # All external libraries necessary for the Trilinos libraries. Nice and
- # easy :-)
- ${Trilinos_TPL_LIBRARIES}
- )
+ DEAL_II_APPEND_LIBRARIES(${TRILINOS_LIBRARIES})
SET(DEAL_II_EXPAND_TRILINOS_VECTOR "TrilinosWrappers::Vector")
SET(DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR "TrilinosWrappers::BlockVector")
diff --git a/deal.II/cmake/configure/configure_arpack.cmake b/deal.II/cmake/configure/configure_arpack.cmake
index 2ce985674b..bf2f5f4aca 100644
--- a/deal.II/cmake/configure/configure_arpack.cmake
+++ b/deal.II/cmake/configure/configure_arpack.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for the ARPACK library:
diff --git a/deal.II/cmake/configure/configure_boost.cmake b/deal.II/cmake/configure/configure_boost.cmake
index 8e28bf83e5..b6ed7c3b2c 100644
--- a/deal.II/cmake/configure/configure_boost.cmake
+++ b/deal.II/cmake/configure/configure_boost.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for the boost library:
@@ -24,7 +26,7 @@
IF(NOT FEATURE_THREADS_PROCESSED)
MESSAGE(FATAL_ERROR "\n"
"Internal build system error:\n"
- "configure_boost.cmake included before configure_tbb.cmake\n\n"
+ "configure_boost.cmake included before configure_1_threads.cmake\n\n"
)
ENDIF()
@@ -35,21 +37,61 @@ SET(DEAL_II_WITH_BOOST ON # Always true. We need it :-]
MACRO(FEATURE_BOOST_FIND_EXTERNAL var)
- #
- # We require at least version 1.44
- #
+
+ IF(NOT DEFINED BOOST_DIR)
+ SET(BOOST_DIR "$ENV{BOOST_DIR}")
+ ELSE()
+ SET_IF_EMPTY(BOOST_DIR "$ENV{BOOST_DIR}")
+ ENDIF()
+ IF(NOT "${BOOST_DIR}" STREQUAL "")
+ SET(BOOST_ROOT "${BOOST_DIR}")
+ ENDIF()
+
IF(DEAL_II_WITH_THREADS)
- FIND_PACKAGE(Boost 1.44 COMPONENTS serialization system thread)
+ SET(_boost_components serialization system thread)
ELSE()
- FIND_PACKAGE(Boost 1.44 COMPONENTS serialization system)
+ SET(_boost_components serialization system)
ENDIF()
+ #
+ # Prefer static libs if BUILD_SHARED_LIBS=OFF:
+ #
+ IF(NOT BUILD_SHARED_LIBS)
+ SET(Boost_USE_STATIC_LIBS TRUE)
+ ENDIF()
+
+ FIND_PACKAGE(Boost 1.44 COMPONENTS ${_boost_components})
+
+ #
+ # Fall back to dynamic libraries if no static libraries could be found:
+ #
+ IF( Boost_USE_STATIC_LIBS AND
+ (NOT Boost_SERIALIZATION_FOUND OR NOT Boost_SYSTEM_FOUND)
+ )
+ SET(Boost_USE_STATIC_LIBS FALSE)
+ FIND_PACKAGE(Boost 1.44 COMPONENTS ${_boost_components})
+ ENDIF()
+
+ 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)
- MARK_AS_ADVANCED(Boost_DIR)
+ ELSE()
+ SET(BOOST_DIR "" CACHE PATH
+ "An optional hint to a boost directory"
+ )
ENDIF()
ENDMACRO()
@@ -66,19 +108,8 @@ MACRO(FEATURE_BOOST_CONFIGURE_EXTERNAL)
#
LIST(REMOVE_ITEM Boost_LIBRARIES "pthread")
- #
- # Transform Boost_LIBRARIES into a list of debug and release libraries
- # without keywords:
- #
- SPLIT_DEBUG_RELEASE(_boost_debug _boost_release ${Boost_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${Boost_LIBRARIES})
- IF (CMAKE_BUILD_TYPE MATCHES "Debug")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG ${_boost_debug})
- ENDIF()
-
- IF (CMAKE_BUILD_TYPE MATCHES "Release")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_RELEASE ${_boost_release})
- ENDIF()
ENDMACRO()
diff --git a/deal.II/cmake/configure/configure_functionparser.cmake b/deal.II/cmake/configure/configure_functionparser.cmake
index 191c33164e..c9abde129d 100644
--- a/deal.II/cmake/configure/configure_functionparser.cmake
+++ b/deal.II/cmake/configure/configure_functionparser.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for functionparser
diff --git a/deal.II/cmake/configure/configure_hdf5.cmake b/deal.II/cmake/configure/configure_hdf5.cmake
index ff85fe9080..9816054301 100644
--- a/deal.II/cmake/configure/configure_hdf5.cmake
+++ b/deal.II/cmake/configure/configure_hdf5.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for the hdf5 library:
@@ -35,6 +37,12 @@ MACRO(FEATURE_HDF5_FIND_EXTERNAL var)
" HDF5_WITH_MPI = ${HDF5_WITH_MPI}\n"
)
ENDIF()
+
+ INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIRS})
+ LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS})
+ DEAL_II_APPEND_LIBRARIES(${HDF5_LIBRARIES})
+
+
ENDIF()
ENDMACRO()
diff --git a/deal.II/cmake/configure/configure_metis.cmake b/deal.II/cmake/configure/configure_metis.cmake
deleted file mode 100644
index 14f76ca5f5..0000000000
--- a/deal.II/cmake/configure/configure_metis.cmake
+++ /dev/null
@@ -1,43 +0,0 @@
-#####
-##
-## Copyright (C) 2012, 2013 by the deal.II authors
-##
-## This file is part of the deal.II library.
-##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
-##
-## Author: Matthias Maier
-##
-#####
-
-#
-# Configuration for the netcdf library:
-#
-
-MACRO(FEATURE_METIS_FIND_EXTERNAL var)
- FIND_PACKAGE(METIS)
-
- IF(METIS_FOUND)
- IF(METIS_MAJOR GREATER 4)
- SET(${var} TRUE)
- ELSE()
- MESSAGE(STATUS "Insufficient metis installation found: "
- "Version 5.x required!"
- )
- SET(METIS_ADDITIONAL_ERROR_STRING
- "Could not find a sufficient modern metis installation: "
- "Version 5.x required!\n"
- )
-
- UNSET(METIS_LIBRARY CACHE)
- UNSET(METIS_INCLUDE_DIR CACHE)
- SET(METIS_DIR "" CACHE PATH
- "An optional hint to a metis directory"
- )
- ENDIF()
- ENDIF()
-ENDMACRO()
-
-CONFIGURE_FEATURE(METIS)
diff --git a/deal.II/cmake/configure/configure_mumps.cmake b/deal.II/cmake/configure/configure_mumps.cmake
index 3757724b59..0739098602 100644
--- a/deal.II/cmake/configure/configure_mumps.cmake
+++ b/deal.II/cmake/configure/configure_mumps.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for the MUMPS library:
@@ -24,7 +26,7 @@ MACRO(FEATURE_MUMPS_CONFIGURE_EXTERNAL)
# The user has to know the location of the MUMPS headers as well:
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${MUMPS_INCLUDE_DIRS})
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${MUMPS_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${MUMPS_LIBRARIES})
ENDMACRO()
CONFIGURE_FEATURE(MUMPS)
diff --git a/deal.II/cmake/configure/configure_netcdf.cmake b/deal.II/cmake/configure/configure_netcdf.cmake
index a8fb4ebc57..b29db310d4 100644
--- a/deal.II/cmake/configure/configure_netcdf.cmake
+++ b/deal.II/cmake/configure/configure_netcdf.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for the netcdf library:
diff --git a/deal.II/cmake/configure/configure_p4est.cmake b/deal.II/cmake/configure/configure_p4est.cmake
index a31ff138dd..9780127bc6 100644
--- a/deal.II/cmake/configure/configure_p4est.cmake
+++ b/deal.II/cmake/configure/configure_p4est.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for the p4est and sc libraries:
@@ -34,13 +36,16 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
"p4est has to be configured with MPI enabled.\n"
)
- UNSET(P4EST_LIBRARY CACHE)
+ UNSET(P4EST_LIBRARY_OPTIMIZED CACHE)
+ UNSET(P4EST_LIBRARY_DEBUG CACHE)
UNSET(P4EST_INCLUDE_DIR CACHE)
- UNSET(SC_LIBRARY CACHE)
+ UNSET(SC_LIBRARY_OPTIMIZED CACHE)
+ UNSET(SC_LIBRARY_DEBUG CACHE)
UNSET(SC_INCLUDE_DIR CACHE)
SET(P4EST_DIR "" CACHE PATH
"An optional hint to a p4est installation/directory"
)
+ MARK_AS_ADVANCED(CLEAR P4EST_DIR)
ELSE()
SET(${var} TRUE)
ENDIF()
@@ -53,7 +58,7 @@ MACRO(FEATURE_P4EST_CONFIGURE_EXTERNAL)
# The user has to know the location of the P4EST headers as well:
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${P4EST_INCLUDE_DIRS})
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${P4EST_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${P4EST_LIBRARIES})
ENDMACRO()
CONFIGURE_FEATURE(P4EST)
diff --git a/deal.II/cmake/configure/configure_slepc.cmake b/deal.II/cmake/configure/configure_slepc.cmake
index cc1ff2b65e..bf5415a0ff 100644
--- a/deal.II/cmake/configure/configure_slepc.cmake
+++ b/deal.II/cmake/configure/configure_slepc.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for the SLEPC library:
@@ -23,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()
@@ -43,6 +50,7 @@ MACRO(FEATURE_SLEPC_FIND_EXTERNAL var)
SET(SLEPC_DIR "" CACHE PATH
"An optional hint to a SLEPc directory"
)
+ MARK_AS_ADVANCED(CLEAR SLEPC_DIR)
SET(${var} FALSE)
ENDIF()
@@ -55,7 +63,7 @@ MACRO(FEATURE_SLEPC_CONFIGURE_EXTERNAL)
# The user has to know the location of the SLEPC headers as well:
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${SLEPC_INCLUDE_DIRS})
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${SLEPC_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${SLEPC_LIBRARIES})
ENDMACRO()
diff --git a/deal.II/cmake/configure/configure_zlib.cmake b/deal.II/cmake/configure/configure_zlib.cmake
index 88fb255111..250210beac 100644
--- a/deal.II/cmake/configure/configure_zlib.cmake
+++ b/deal.II/cmake/configure/configure_zlib.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Configuration for the zlib library:
diff --git a/deal.II/cmake/macros/macro_add_flags.cmake b/deal.II/cmake/macros/macro_add_flags.cmake
index a56bb3ae30..db70587a7d 100644
--- a/deal.II/cmake/macros/macro_add_flags.cmake
+++ b/deal.II/cmake/macros/macro_add_flags.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# A small macro used for (string-)appending a string "${flags}" to a
diff --git a/deal.II/cmake/macros/macro_check_cxx_compiler_bug.cmake b/deal.II/cmake/macros/macro_check_cxx_compiler_bug.cmake
index ea2c41b433..6c600a2729 100644
--- a/deal.II/cmake/macros/macro_check_cxx_compiler_bug.cmake
+++ b/deal.II/cmake/macros/macro_check_cxx_compiler_bug.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Check for a compiler bug.
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_cond_set_to_yes.cmake b/deal.II/cmake/macros/macro_cond_set_to_yes.cmake
index a0b6e40438..2eb3efaebc 100644
--- a/deal.II/cmake/macros/macro_cond_set_to_yes.cmake
+++ b/deal.II/cmake/macros/macro_cond_set_to_yes.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# If bool is "true" (in a cmake fashion...), set variable to "yes",
diff --git a/deal.II/cmake/macros/macro_configure_feature.cmake b/deal.II/cmake/macros/macro_configure_feature.cmake
index 991531e19b..0ffbf4fb10 100644
--- a/deal.II/cmake/macros/macro_configure_feature.cmake
+++ b/deal.II/cmake/macros/macro_configure_feature.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# This macro is used for the feature configuration in deal.II
@@ -55,11 +57,11 @@
#
-###########################################################################
-# #
-# Helper Macros: #
-# #
-###########################################################################
+########################################################################
+# #
+# Helper Macros: #
+# #
+########################################################################
#
# Some black magic to have substitution in command names:
@@ -140,19 +142,19 @@ MACRO(FEATURE_CONFIGURE_EXTERNAL _feature)
INCLUDE_DIRECTORIES(${${_feature}_INCLUDE_DIRS})
ENDIF()
IF(DEFINED ${_feature}_LIBRARIES)
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${${_feature}_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${${_feature}_LIBRARIES})
ENDIF()
IF(DEFINED ${_feature}_LINKER_FLAGS)
- ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${${_feature}_LINKER_FLAGS}")
+ ADD_FLAGS(DEAL_II_LINKER_FLAGS "${${_feature}_LINKER_FLAGS}")
ENDIF()
ENDMACRO()
-###########################################################################
-# #
-# CONFIGURE_FEATURE: #
-# #
-###########################################################################
+########################################################################
+# #
+# CONFIGURE_FEATURE: #
+# #
+########################################################################
MACRO(CONFIGURE_FEATURE _feature)
#
diff --git a/deal.II/cmake/macros/macro_deal_ii_add_definitions.cmake b/deal.II/cmake/macros/macro_deal_ii_add_definitions.cmake
index d626feafc8..01969882a1 100644
--- a/deal.II/cmake/macros/macro_deal_ii_add_definitions.cmake
+++ b/deal.II/cmake/macros/macro_deal_ii_add_definitions.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# A small wrapper around
diff --git a/deal.II/cmake/macros/macro_deal_ii_add_dependencies.cmake b/deal.II/cmake/macros/macro_deal_ii_add_dependencies.cmake
index 87ea359076..037885ff15 100644
--- a/deal.II/cmake/macros/macro_deal_ii_add_dependencies.cmake
+++ b/deal.II/cmake/macros/macro_deal_ii_add_dependencies.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# A small wrapper around ADD_DEPENDENCIES to add the specified dependencies
diff --git a/deal.II/cmake/macros/macro_deal_ii_add_library.cmake b/deal.II/cmake/macros/macro_deal_ii_add_library.cmake
index a86d4dba44..26c7ee3b81 100644
--- a/deal.II/cmake/macros/macro_deal_ii_add_library.cmake
+++ b/deal.II/cmake/macros/macro_deal_ii_add_library.cmake
@@ -1,28 +1,30 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# A small wrapper around ADD_LIBRARY that will define a target for each
# build type specified in DEAL_II_BUILD_TYPES
#
# It is assumed that the desired compilation configuration is set via
-# DEAL_II_SHARED_LINKER_FLAGS_${build}
+# DEAL_II_LINKER_FLAGS_${build}
# DEAL_II_CXX_FLAGS_${build}
# DEAL_II_DEFINITIONS_${build}
#
# as well as the global (for all build types)
-# CMAKE_SHARED_LINKER_FLAGS
+# DEAL_II_LINKER_FLAGS
# CMAKE_CXX_FLAGS
# DEAL_II_DEFINITIONS
#
@@ -37,7 +39,7 @@ MACRO(DEAL_II_ADD_LIBRARY _library)
)
SET_TARGET_PROPERTIES(${_library}.${_build_lowercase} PROPERTIES
- LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_${_build}}"
+ LINK_FLAGS "${DEAL_II_LINKER_FLAGS};${DEAL_II_LINKER_FLAGS_${_build}}"
COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${_build}}"
LINKER_LANGUAGE "CXX"
diff --git a/deal.II/cmake/macros/macro_deal_ii_append_libraries.cmake b/deal.II/cmake/macros/macro_deal_ii_append_libraries.cmake
new file mode 100644
index 0000000000..de291d39b6
--- /dev/null
+++ b/deal.II/cmake/macros/macro_deal_ii_append_libraries.cmake
@@ -0,0 +1,47 @@
+## ---------------------------------------------------------------------
+## $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 add libraries to
+# DEAL_II_EXTERNAL_LIBRARIES
+# DEAL_II_EXTERNAL_LIBRARIES_DEBUG
+# DEAL_II_EXTERNAL_LIBRARIES_RELEASE
+# depending on the "optmized", "debug" or "general" keyword
+#
+# Usage:
+# DEAL_II_APPEND_LIBRARIES()
+#
+
+MACRO(DEAL_II_APPEND_LIBRARIES)
+
+ SET(_toggle "general")
+ FOREACH(_tmp ${ARGN})
+ IF( "${_tmp}" STREQUAL "debug" OR
+ "${_tmp}" STREQUAL "optimized" OR
+ "${_tmp}" STREQUAL "general" )
+ SET(_toggle "${_tmp}")
+ ELSE()
+ IF("${_toggle}" STREQUAL "general")
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${_tmp})
+ ELSEIF("${_toggle}" STREQUAL "debug")
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG ${_tmp})
+ ELSEIF("${_toggle}" STREQUAL "optimized")
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_RELEASE ${_tmp})
+ ENDIF()
+ ENDIF()
+ ENDFOREACH()
+
+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 6aa654d35b..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
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# This file implements the DEAL_II_INITIALIZE_VARIABLES macro, which is
@@ -49,24 +51,40 @@ MACRO(DEAL_II_INITIALIZE_CACHED_VARIABLES)
ENDIF()
#
- # Bail out if build type is unknown...
+ # 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 "${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND
- NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
- MESSAGE(FATAL_ERROR
- "\nCMAKE_BUILD_TYPE does neither match Release nor Debug!\n\n"
+ 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()
+ SET(_new_build_type "${DEAL_II_BUILD_TYPE}")
+ ENDIF()
+
+ MESSAGE(
+"###
+#
+# WARNING:
+#
+# CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\" unsupported by current installation!
+# deal.II was built with CMAKE_BUILD_TYPE \"${DEAL_II_BUILD_TYPE}\".
+#
+# CMAKE_BUILD_TYPE is forced to \"${_new_build_type}\".
+#
+###"
)
- ENDIF()
- #
- # ... or unsupported
- #
- IF(NOT DEAL_II_BUILD_TYPE MATCHES "${CMAKE_BUILD_TYPE}")
- MESSAGE(FATAL_ERROR "\n"
- "CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\" unsupported by current installation!\n"
- "deal.II was build with \"${DEAL_II_BUILD_TYPE}\" only build type.\n\n"
+ SET(CMAKE_BUILD_TYPE "${_new_build_type}" CACHE STRING
+ "Choose the type of build, options are: Debug, Release"
+ FORCE
)
ENDIF()
+
SET(CMAKE_CXX_COMPILER ${DEAL_II_CXX_COMPILER} CACHE STRING
"CXX Compiler.")
diff --git a/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake b/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
index e643446317..a418855339 100644
--- a/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
+++ b/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# This file implements the DEAL_II_INVOKE_AUTOPILOT macro, which is
@@ -40,95 +42,89 @@ MACRO(DEAL_II_INVOKE_AUTOPILOT)
ADD_EXECUTABLE(${TARGET} ${TARGET_SRC})
DEAL_II_SETUP_TARGET(${TARGET})
- IF(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
- MESSAGE(STATUS
- "Out-of-source build. Target ${TARGET} defined but additional "
- "autopilot funcionality is not available."
- )
+ MESSAGE(STATUS "Autopilot invoked")
- ELSE()
+ # Define a custom target to easily run the program:
+
+ IF(NOT DEFINED TARGET_RUN)
+ SET(TARGET_RUN ${TARGET})
+ ENDIF()
- MESSAGE(STATUS "Autopilot invoked")
-
- # Define a custom target to easily run the program:
-
- IF(NOT DEFINED TARGET_RUN)
- SET(TARGET_RUN ${TARGET})
- ENDIF()
-
- #
- # Hack for Cygwin targets: Export PATH to point to the dynamic library.
- # This is more or less harmless, so do this unconditionally.
- #
- FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/run_target.cmake
- "SET(ENV{PATH} \"${CMAKE_CURRENT_BINARY_DIR}:${DEAL_II_PATH}/${DEAL_II_LIBRARY_RELDIR}:\$ENV{PATH}\")\n"
- "EXECUTE_PROCESS(COMMAND ${TARGET_RUN}\n"
- " RESULT_VARIABLE _return_value\n"
- " )\n"
- "IF(NOT \"\${_return_value}\" STREQUAL "0")\n"
- " MESSAGE(SEND_ERROR \"\nProgram terminated with exit code: \${_return_value}\")\n"
- "ENDIF()\n"
+ #
+ # Hack for Cygwin targets: Export PATH to point to the dynamic library.
+ # This is more or less harmless, so do this unconditionally.
+ #
+ FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/run_target.cmake
+ "SET(ENV{PATH} \"${CMAKE_CURRENT_BINARY_DIR}:${DEAL_II_PATH}/${DEAL_II_LIBRARY_RELDIR}:\$ENV{PATH}\")\n"
+ "EXECUTE_PROCESS(COMMAND ${TARGET_RUN}\n"
+ " RESULT_VARIABLE _return_value\n"
+ " )\n"
+ "IF(NOT \"\${_return_value}\" STREQUAL "0")\n"
+ " MESSAGE(SEND_ERROR \"\nProgram terminated with exit code: \${_return_value}\")\n"
+ "ENDIF()\n"
+ )
+ IF(NOT "${TARGET_RUN}" STREQUAL "")
+ ADD_CUSTOM_TARGET(run
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/run_target.cmake
+ DEPENDS ${TARGET}
+ COMMENT "Run ${TARGET} with ${CMAKE_BUILD_TYPE} configuration"
)
- IF(NOT "${TARGET_RUN}" STREQUAL "")
- ADD_CUSTOM_TARGET(run
- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/run_target.cmake
- DEPENDS ${TARGET}
- COMMENT "Run ${TARGET} with ${CMAKE_BUILD_TYPE} configuration"
- )
- SET(_run_targets
- "# $ make run - to (compile, link and) run the program\n"
- )
- ENDIF()
-
- # Define custom targets to easily switch the build type:
- IF(${DEAL_II_BUILD_TYPE} MATCHES "Debug")
- ADD_CUSTOM_TARGET(debug
- COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
- COMMENT "Switch CMAKE_BUILD_TYPE to Debug"
- )
- SET(_switch_targets
- "# $ make debug - to switch the build type to \"Debug\"\n"
- )
- ENDIF()
- IF(${DEAL_II_BUILD_TYPE} MATCHES "Release")
- ADD_CUSTOM_TARGET(release
- COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
- COMMENT "Switch CMAKE_BUILD_TYPE to Release"
- )
- SET(_switch_targets
- "${_switch_targets}# $ make release - to switch the build type to \"Release\"\n"
- )
- ENDIF()
-
- # And another custom target to clean up all files generated by the program:
- IF("${CLEAN_UP_FILES}" STREQUAL "")
- SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
- ENDIF()
- ADD_CUSTOM_TARGET(runclean
- COMMAND ${CMAKE_COMMAND} -E remove ${CLEAN_UP_FILES}
- COMMENT "runclean invoked"
+ SET(_run_targets
+ "# $ make run - to (compile, link and) run the program\n"
)
+ ENDIF()
- # Define a distclean target to remove every generated file:
- ADD_CUSTOM_TARGET(distclean
- COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean
- COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target runclean
- COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles
- COMMAND ${CMAKE_COMMAND} -E remove CMakeCache.txt cmake_install.cmake Makefile
- COMMENT "distclean invoked"
+ # Define custom targets to easily switch the build type:
+ ADD_CUSTOM_TARGET(debug
+ COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
+ COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target all
+ COMMENT "Switch CMAKE_BUILD_TYPE to Debug"
+ )
+
+ ADD_CUSTOM_TARGET(release
+ COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
+ COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target all
+ COMMENT "Switch CMAKE_BUILD_TYPE to Release"
+ )
+
+ # Only mention release and debug targets if it is actuallay possible to
+ # switch between them:
+ IF(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease")
+ SET(_switch_targets
+"# $ make debug - to switch the build type to \"Debug\"
+# $ make release - to switch the build type to \"Release\"\n"
)
+ ENDIF()
- # Define a strip-comments target:
- FIND_PACKAGE(Perl QUIET)
- IF(PERL_FOUND)
- ADD_CUSTOM_TARGET(strip_comments
- COMMAND ${PERL_EXECUTABLE} -pi -e 's\#^[ \\t]*//.*\\n\#\#g;' ${TARGET_SRC}
- COMMENT "strip comments"
- )
- ENDIF()
-
- # Print out some usage information to file:
- FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
+ # And another custom target to clean up all files generated by the program:
+ IF("${CLEAN_UP_FILES}" STREQUAL "")
+ SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+ ENDIF()
+ ADD_CUSTOM_TARGET(runclean
+ COMMAND ${CMAKE_COMMAND} -E remove ${CLEAN_UP_FILES}
+ COMMENT "runclean invoked"
+ )
+
+ # Define a distclean target to remove every generated file:
+ ADD_CUSTOM_TARGET(distclean
+ COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean
+ COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target runclean
+ COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles
+ COMMAND ${CMAKE_COMMAND} -E remove CMakeCache.txt cmake_install.cmake Makefile
+ COMMENT "distclean invoked"
+ )
+
+ # Define a strip-comments target:
+ FIND_PACKAGE(Perl QUIET)
+ IF(PERL_FOUND)
+ ADD_CUSTOM_TARGET(strip_comments
+ COMMAND ${PERL_EXECUTABLE} -pi -e 's\#^[ \\t]*//.*\\n\#\#g;' ${TARGET_SRC}
+ COMMENT "strip comments"
+ )
+ ENDIF()
+
+ # Print out some usage information to file:
+ FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
"MESSAGE(
\"###
#
@@ -158,21 +154,19 @@ ${_switch_targets}#
# Have a nice day!
#
###\")"
- )
+ )
- # A custom target to print the message:
- ADD_CUSTOM_TARGET(help
- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
- )
-
- # Print this message once:
- IF(NOT USAGE_PRINTED)
- INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake)
- SET(USAGE_PRINTED TRUE CACHE INTERNAL "")
- ELSE()
- MESSAGE(STATUS "Run $ make help to print a detailed help message")
- ENDIF()
+ # A custom target to print the message:
+ ADD_CUSTOM_TARGET(help
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
+ )
+ # Print this message once:
+ IF(NOT USAGE_PRINTED)
+ INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake)
+ SET(USAGE_PRINTED TRUE CACHE INTERNAL "")
+ ELSE()
+ MESSAGE(STATUS "Run $ make help to print a detailed help message")
ENDIF()
ENDMACRO()
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 ef17eb7e7f..28b88dd1d0 100644
--- a/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake
+++ b/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# This file implements the DEAL_II_SETUP_TARGET macro, which is
@@ -59,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. Ther 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.
@@ -95,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}"
)
@@ -116,4 +123,14 @@ MACRO(DEAL_II_SETUP_TARGET _target)
#
TARGET_LINK_LIBRARIES(${_target} ${DEAL_II_TARGET})
+ #
+ # If DEAL_II_STATIC_EXECUTABLE is set, switch the final link type to
+ # static:
+ #
+ IF(DEAL_II_STATIC_EXECUTABLE)
+ SET_PROPERTY(TARGET ${_target} PROPERTY
+ LINK_SEARCH_END_STATIC TRUE
+ )
+ ENDIF()
+
ENDMACRO()
diff --git a/deal.II/cmake/macros/macro_enable_if_links.cmake b/deal.II/cmake/macros/macro_enable_if_links.cmake
index e2d2a2b9e3..6c2bfeb6d1 100644
--- a/deal.II/cmake/macros/macro_enable_if_links.cmake
+++ b/deal.II/cmake/macros/macro_enable_if_links.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Tests whether it is possible to compile and link a dummy program with a
@@ -28,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_if_supported.cmake b/deal.II/cmake/macros/macro_enable_if_supported.cmake
index 9c98c9155e..8e26c7b0c7 100644
--- a/deal.II/cmake/macros/macro_enable_if_supported.cmake
+++ b/deal.II/cmake/macros/macro_enable_if_supported.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Tests whether the cxx compiler understands a flag.
@@ -26,6 +28,7 @@ MACRO(ENABLE_IF_SUPPORTED _variable _flag)
STRING(REGEX REPLACE "^-" "" _flag_name "${_flag_stripped}")
STRING(REPLACE "," "" _flag_name "${_flag_name}")
STRING(REPLACE "--" "__" _flag_name "${_flag_name}")
+ STRING(REPLACE "++" "__" _flag_name "${_flag_name}")
CHECK_CXX_COMPILER_FLAG(
"${_flag_stripped}"
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
new file mode 100644
index 0000000000..fccb978ae4
--- /dev/null
+++ b/deal.II/cmake/macros/macro_enable_language_optional.cmake
@@ -0,0 +1,74 @@
+## ---------------------------------------------------------------------
+## $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.
+##
+## ---------------------------------------------------------------------
+
+
+#
+# Test whether a usable language compiler is available and if yes, call
+# ENABLE_LANGUAGE(language)
+#
+# This works around a severe bug [1] in
+#
+# ENABLE_LANGUAGE(Fortran OPTIONAL)
+#
+# [1] http://public.kitware.com/Bug/view.php?id=9220
+#
+# Usage:
+# ENABLE_LANGUAGE_FORTRAN_OPTIONAL(language)
+#
+# where language is either C or Fortran
+#
+
+MACRO(ENABLE_LANGUAGE_OPTIONAL _language)
+ 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)
+ file(REMOVE ${_tmp})
+
+ IF(DEFINED CMAKE_${_language}_COMPILER)
+ SET(_hint "-DCMAKE_${_language}_COMPILER=${CMAKE_${_language}_COMPILER}")
+ ENDIF()
+
+ FILE(WRITE ${_tmp}/CMakeLists.txt
+ "PROJECT(foobar ${_language})"
+ )
+
+ EXECUTE_PROCESS(
+ COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} ${_hint} .
+ WORKING_DIRECTORY ${_tmp}
+ RESULT_VARIABLE _result
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )
+
+ 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_expand_instantiations.cmake b/deal.II/cmake/macros/macro_expand_instantiations.cmake
index f083500249..684860d475 100644
--- a/deal.II/cmake/macros/macro_expand_instantiations.cmake
+++ b/deal.II/cmake/macros/macro_expand_instantiations.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# A macro for the inst.in file expansion
@@ -33,22 +35,16 @@
MACRO(EXPAND_INSTANTIATIONS _target _inst_in_files)
- IF(CMAKE_CROSSCOMPILING)
- SET(_ei_exec native-expand_instantiations)
- ELSE()
- SET(_ei_exec expand_instantiations)
- ENDIF()
-
FOREACH (_inst_in_file ${_inst_in_files})
STRING(REGEX REPLACE "\\.in$" "" _inst_file "${_inst_in_file}" )
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file}
- DEPENDS ${_ei_exec}
- ${CMAKE_BINARY_DIR}/cmake/config/template-arguments
+ DEPENDS expand_instantiations
+ ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/template-arguments
${CMAKE_CURRENT_SOURCE_DIR}/${_inst_in_file}
- COMMAND ${_ei_exec}
- ARGS ${CMAKE_BINARY_DIR}/cmake/config/template-arguments
+ COMMAND expand_instantiations
+ ARGS ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/template-arguments
< ${CMAKE_CURRENT_SOURCE_DIR}/${_inst_in_file}
> ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file}
)
diff --git a/deal.II/cmake/macros/macro_find_package.cmake b/deal.II/cmake/macros/macro_find_package.cmake
index 01adf7a2bc..c7e65fbe85 100644
--- a/deal.II/cmake/macros/macro_find_package.cmake
+++ b/deal.II/cmake/macros/macro_find_package.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
## Copyright (C) 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# A small wrapper around FIND_PACKAGE.
diff --git a/deal.II/cmake/macros/macro_item_matches.cmake b/deal.II/cmake/macros/macro_item_matches.cmake
index 748661a2e6..3e747bb4c4 100644
--- a/deal.II/cmake/macros/macro_item_matches.cmake
+++ b/deal.II/cmake/macros/macro_item_matches.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# A small macro to test whether a given list contains an element.
diff --git a/deal.II/cmake/macros/macro_pop_test_flag.cmake b/deal.II/cmake/macros/macro_pop_test_flag.cmake
index c39529c40e..045fe43e2f 100644
--- a/deal.II/cmake/macros/macro_pop_test_flag.cmake
+++ b/deal.II/cmake/macros/macro_pop_test_flag.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# A small macro used in the platform checks to remove the right most flag in
diff --git a/deal.II/cmake/macros/macro_push_test_flag.cmake b/deal.II/cmake/macros/macro_push_test_flag.cmake
index 23f6f30f87..905ce92e16 100644
--- a/deal.II/cmake/macros/macro_push_test_flag.cmake
+++ b/deal.II/cmake/macros/macro_push_test_flag.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# A small macro used in the platform checks to easily add a flag to
diff --git a/deal.II/cmake/macros/macro_replace_flag.cmake b/deal.II/cmake/macros/macro_replace_flag.cmake
index 5ab43cac49..22dd7bafa0 100644
--- a/deal.II/cmake/macros/macro_replace_flag.cmake
+++ b/deal.II/cmake/macros/macro_replace_flag.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Replace all occurences of "${flag}" with "${replacement}" in the string
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/macros/macro_set_if_empty.cmake b/deal.II/cmake/macros/macro_set_if_empty.cmake
index 98031b0492..43f0125445 100644
--- a/deal.II/cmake/macros/macro_set_if_empty.cmake
+++ b/deal.II/cmake/macros/macro_set_if_empty.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# If 'variable' is empty it will be set to 'value'
diff --git a/deal.II/cmake/macros/macro_split_debug_release.cmake b/deal.II/cmake/macros/macro_split_debug_release.cmake
deleted file mode 100644
index c39c5fb4c5..0000000000
--- a/deal.II/cmake/macros/macro_split_debug_release.cmake
+++ /dev/null
@@ -1,53 +0,0 @@
-#####
-##
-## Copyright (C) 2013 by the deal.II authors
-##
-## This file is part of the deal.II library.
-##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
-##
-## Author: Matthias Maier
-##
-#####
-
-
-#
-# A small macro to split a list of libraries with debug, optimized and
-# general keywords into two lists consisting of all libraries necessary for
-# the debug and release target only. If no keyword is given "optimized" is
-# assumed.
-#
-# Usage:
-# SPLIT_DEBUG_RELEASE(list_debug list_release <...list of libraries...>)
-#
-#
-
-MACRO(SPLIT_DEBUG_RELEASE _list_debug _list_release)
-
- SET(_toggle "optimized")
- FOREACH(_tmp ${ARGN})
- IF("${_tmp}" STREQUAL "debug" OR
- "${_tmp}" STREQUAL "optimized" OR
- "${_tmp}" STREQUAL "general")
- SET(_toggle "${_tmp}")
- ELSE()
- IF("${_toggle}" STREQUAL "general")
- LIST(APPEND ${_list_debug} "${_tmp}")
- LIST(APPEND ${_list_release} "${_tmp}")
- ELSEIF("${_toggle}" STREQUAL "debug")
- LIST(APPEND ${_list_debug} "${_tmp}")
- ELSEIF("${_toggle}" STREQUAL "optimized")
- LIST(APPEND ${_list_release} "${_tmp}")
- ENDIF()
- ENDIF()
- ENDFOREACH()
-
- IF("${${_list_debug}}" STREQUAL "")
- SET(${_list_debug} ${${_list_release}})
- ELSEIF("${${_list_release}}" STREQUAL "")
- SET(${_list_release} ${${_list_debug}})
- ENDIF()
-
-ENDMACRO()
diff --git a/deal.II/cmake/macros/macro_strip_flag.cmake b/deal.II/cmake/macros/macro_strip_flag.cmake
index d90979ad9b..c1eb32d8e0 100644
--- a/deal.II/cmake/macros/macro_strip_flag.cmake
+++ b/deal.II/cmake/macros/macro_strip_flag.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Remove all occurences of "${flag}" in the string variable.
diff --git a/deal.II/cmake/macros/macro_switch_library_preference.cmake b/deal.II/cmake/macros/macro_switch_library_preference.cmake
new file mode 100644
index 0000000000..9f61f9b094
--- /dev/null
+++ b/deal.II/cmake/macros/macro_switch_library_preference.cmake
@@ -0,0 +1,33 @@
+## ---------------------------------------------------------------------
+## $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 macro toggles the preference for static/shared libraries if
+# DEAL_II_PREFER_STATIC_LIBS=TRUE but the final executable will still be
+# dynamically linked, i.e. DEAL_II_STATIC_EXECUTABLE=OFF
+#
+# Usage:
+# SWITCH_LIBRARY_PREFERENCE()
+#
+
+MACRO(SWITCH_LIBRARY_PREFERENCE)
+ IF(DEAL_II_PREFER_STATIC_LIBS AND NOT DEAL_II_STATIC_EXECUTABLE)
+ #
+ # Invert the search order for libraries when DEAL_II_PREFER_STATIC_LIBS
+ # is set. This will prefer static archives instead of shared libraries:
+ LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
+ ENDIF()
+ENDMACRO()
diff --git a/deal.II/cmake/macros/macro_to_string.cmake b/deal.II/cmake/macros/macro_to_string.cmake
index 7f52449d38..95b6b06aea 100644
--- a/deal.II/cmake/macros/macro_to_string.cmake
+++ b/deal.II/cmake/macros/macro_to_string.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# A small macro used for converting a list into a space
diff --git a/deal.II/cmake/macros/macro_to_string_and_add_prefix.cmake b/deal.II/cmake/macros/macro_to_string_and_add_prefix.cmake
index 8a7214f114..f382578a97 100644
--- a/deal.II/cmake/macros/macro_to_string_and_add_prefix.cmake
+++ b/deal.II/cmake/macros/macro_to_string_and_add_prefix.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# A small macro used for converting a cmake list into a space
diff --git a/deal.II/cmake/modules/FindARPACK.cmake b/deal.II/cmake/modules/FindARPACK.cmake
index a57f307961..f2bb51d628 100644
--- a/deal.II/cmake/modules/FindARPACK.cmake
+++ b/deal.II/cmake/modules/FindARPACK.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Try to find the ARPACK library
@@ -32,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
@@ -46,21 +48,23 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(ARPACK DEFAULT_MSG
LAPACK_FOUND
)
+MARK_AS_ADVANCED(
+ lapack_LIBRARY
+ atlas_LIBRARY
+ blas_LIBRARY
+ ARPACK_LIBRARY
+ )
+
IF(ARPACK_FOUND)
SET(ARPACK_LIBRARIES
- ${ARPACK_LIBRARY} ${LAPACK_LIBRARIES}
+ ${ARPACK_LIBRARY}
+ ${LAPACK_LIBRARIES}
)
SET(ARPACK_LINKER_FLAGS
${LAPACK_LINKER_FLAGS}
)
- MARK_AS_ADVANCED(
- lapack_LIBRARY
- atlas_LIBRARY
- blas_LIBRARY
- ARPACK_LIBRARY
- ARPACK_DIR
- )
+ MARK_AS_ADVANCED(ARPACK_DIR)
ELSE()
SET(ARPACK_DIR "" CACHE PATH
"An optional hint to an ARPACK installation"
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/FindHDF5.cmake b/deal.II/cmake/modules/FindHDF5.cmake
index 12675f7ed2..bac83af2d6 100644
--- a/deal.II/cmake/modules/FindHDF5.cmake
+++ b/deal.II/cmake/modules/FindHDF5.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Try to find the HDF5 library
@@ -47,9 +49,15 @@ FIND_LIBRARY(HDF5_HL_LIBRARY NAMES hdf5_hl
lib${LIB_SUFFIX} lib64 lib
)
-SET(_output ${HDF5_LIBRARY} ${HDF5_HL_LIBRARY})
+SET(_output ${HDF5_HL_LIBRARY} ${HDF5_LIBRARY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HDF5 DEFAULT_MSG
_output # Cosmetic: Gives nice output
+ HDF5_HL_LIBRARY
+ HDF5_LIBRARY
+ HDF5_INCLUDE_DIR
+ )
+
+MARK_AS_ADVANCED(
HDF5_LIBRARY
HDF5_HL_LIBRARY
HDF5_INCLUDE_DIR
@@ -60,8 +68,9 @@ IF(HDF5_FOUND)
${HDF5_INCLUDE_DIR}
)
SET(HDF5_LIBRARIES
- ${HDF5_LIBRARY}
${HDF5_HL_LIBRARY}
+ ${HDF5_LIBRARY}
+ ${MPI_C_LIBRARIES} # for good measure
)
#
@@ -75,12 +84,7 @@ IF(HDF5_FOUND)
SET(HDF5_WITH_MPI TRUE)
ENDIF()
- MARK_AS_ADVANCED(
- HDF5_DIR
- HDF5_LIBRARY
- HDF5_HL_LIBRARY
- HDF5_INCLUDE_DIR
- )
+ MARK_AS_ADVANCED(HDF5_DIR)
ELSE()
SET(HDF5_DIR "" CACHE PATH
"An optional hint to an hdf5 directory"
diff --git a/deal.II/cmake/modules/FindMETIS.cmake b/deal.II/cmake/modules/FindMETIS.cmake
index b0a92789ee..29c9be531f 100644
--- a/deal.II/cmake/modules/FindMETIS.cmake
+++ b/deal.II/cmake/modules/FindMETIS.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Try to find the (serial) METIS library
@@ -19,6 +21,10 @@
#
# METIS_LIBRARIES
# METIS_INCLUDE_DIRS
+# METIS_VERSION
+# METIS_VERSION_MAJOR
+# METIS_VERSION_MINOR
+# METIS_VERSION_SUBMINOR
#
INCLUDE(FindPackageHandleStandardArgs)
@@ -26,8 +32,10 @@ INCLUDE(FindPackageHandleStandardArgs)
SET_IF_EMPTY(METIS_DIR "$ENV{METIS_DIR}")
#
-# TODO: Metis is usually pretty self contained. So no external dependencies
-# so far... But there could be dependencies on pcre and mpi...
+# Metis is usually pretty self contained. So no external dependencies
+# so far. But there could be dependencies on pcre and mpi...
+#
+# Link in MPI unconditionally (if found).
#
FIND_PATH(METIS_INCLUDE_DIR metis.h
@@ -47,31 +55,65 @@ FIND_LIBRARY(METIS_LIBRARY
build/${CMAKE_CXX_PLATFORM_ID}-${CMAKE_SYSTEM_PROCESSOR}/libmetis
)
+FIND_LIBRARY(PARMETIS_LIBRARY
+ NAMES parmetis
+ HINTS
+ ${METIS_DIR}
+ PATH_SUFFIXES
+ lib${LIB_SUFFIX} lib64 lib
+ # This is a hint, isn't it?
+ build/${CMAKE_CXX_PLATFORM_ID}-${CMAKE_SYSTEM_PROCESSOR}/libmetis
+ )
+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(METIS DEFAULT_MSG
METIS_LIBRARY
METIS_INCLUDE_DIR
)
+MARK_AS_ADVANCED(
+ METIS_LIBRARY
+ PARMETIS_LIBRARY
+ METIS_INCLUDE_DIR
+ )
+
IF(METIS_FOUND)
- SET(METIS_LIBRARIES ${METIS_LIBRARY})
+
+ IF(NOT PARMETIS_LIBRARY MATCHES "-NOTFOUND")
+ SET(METIS_LIBRARIES ${PARMETIS_LIBRARY})
+ ENDIF()
+
+ LIST(APPEND METIS_LIBRARIES
+ ${METIS_LIBRARY}
+ ${MPI_C_LIBRARIES} # for good measure
+ )
SET(METIS_INCLUDE_DIRS ${METIS_INCLUDE_DIR})
#
# 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_LIBRARY
- METIS_INCLUDE_DIR
- METIS_DIR
- )
+ MARK_AS_ADVANCED(METIS_DIR)
ELSE()
SET(METIS_DIR "" CACHE PATH
"An optional hint to a metis directory"
diff --git a/deal.II/cmake/modules/FindMUMPS.cmake b/deal.II/cmake/modules/FindMUMPS.cmake
index 0a3299c541..24e48975de 100644
--- a/deal.II/cmake/modules/FindMUMPS.cmake
+++ b/deal.II/cmake/modules/FindMUMPS.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Try to find the MUMPS library
@@ -31,11 +33,8 @@ INCLUDE(FindPackageHandleStandardArgs)
# (We'll rely on the user of FindMUMPS, setting up mpi *cough*)
#
FIND_PACKAGE(SCALAPACK) # which will also include lapack and blas
+FIND_PACKAGE(METIS)
-#
-# TODO: mumps might link to scotch and or metis as well. Ignore this for
-# now. :-]
-#
FIND_PATH(MUMPS_INCLUDE_DIR dmumps_c.h
HINTS
@@ -82,6 +81,13 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(MUMPS DEFAULT_MSG
SCALAPACK_FOUND
)
+MARK_AS_ADVANCED(
+ DMUMPS_LIBRARY
+ MUMPS_COMMON_LIBRARY
+ MUMPS_INCLUDE_DIR
+ PORT_LIBRARY
+ )
+
IF(MUMPS_FOUND)
SET(MUMPS_INCLUDE_DIRS
${MUMPS_INCLUDE_DIR}
@@ -91,18 +97,14 @@ IF(MUMPS_FOUND)
${MUMPS_COMMON_LIBRARY}
${PORD_LIBRARY}
${SCALAPACK_LIBRARIES}
- ${MPI_CXX_LIBRARIES} # For good measure
+ ${METIS_LIBRARIES} # for good measure
+ ${MPI_Fortran_LIBRARIES} # for good measure
)
SET(MUMPS_LINKER_FLAGS
${SCALAPACK_LINKER_FLAGS}
)
- MARK_AS_ADVANCED(
- DMUMPS_LIBRARY
- MUMPS_COMMON_LIBRARY
- MUMPS_INCLUDE_DIR
- PORT_LIBRARY
- )
+ MARK_AS_ADVANCED(MUMPS_DIR)
ELSE()
SET(MUMPS_DIR "" CACHE PATH
"An optional hint to a mumps directory"
diff --git a/deal.II/cmake/modules/FindNETCDF.cmake b/deal.II/cmake/modules/FindNETCDF.cmake
index 0ae1cf535c..066decd95e 100644
--- a/deal.II/cmake/modules/FindNETCDF.cmake
+++ b/deal.II/cmake/modules/FindNETCDF.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Try to find the NETCDF C and C++ libraries
@@ -61,6 +63,12 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETCDF DEFAULT_MSG
NETCDF_INCLUDE_DIR
)
+MARK_AS_ADVANCED(
+ NETCDF_CPLUSPLUS_LIBRARY
+ NETCDF_C_LIBRARY
+ NETCDF_INCLUDE_DIR
+ )
+
IF(NETCDF_FOUND)
SET(NETCDF_INCLUDE_DIRS
${NETCDF_INCLUDE_DIR}
@@ -70,12 +78,7 @@ IF(NETCDF_FOUND)
${NETCDF_C_LIBRARY}
)
- MARK_AS_ADVANCED(
- NETCDF_CPLUSPLUS_LIBRARY
- NETCDF_C_LIBRARY
- NETCDF_INCLUDE_DIR
- NETCDF_DIR
- )
+ MARK_AS_ADVANCED(NETCDF_DIR)
ELSE()
SET(NETCDF_DIR "" CACHE PATH
"An optional hint to a NETCDF installation"
diff --git a/deal.II/cmake/modules/FindP4EST.cmake b/deal.II/cmake/modules/FindP4EST.cmake
index e2c0727dc8..c7cab6ed1f 100644
--- a/deal.II/cmake/modules/FindP4EST.cmake
+++ b/deal.II/cmake/modules/FindP4EST.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Try to find the P4EST library
@@ -19,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)
@@ -26,30 +33,15 @@ INCLUDE(FindPackageHandleStandardArgs)
SET_IF_EMPTY(P4EST_DIR "$ENV{P4EST_DIR}")
SET_IF_EMPTY(SC_DIR "$ENV{SC_DIR}")
-#
-# We used to recommend installing p4est with a custom script that
-# compiled p4est twice, once in debug and once in optimized mode.
-# the installation would then have happened into directories
-# $P4EST_DIR/DEBUG and $P4EST_DIR/FAST. If we can find these
-# two directories, then use the FAST directory rather than trying
-# to figure out how we can build deal.II against the two libraries
-# depending on whether we are in debug or optimized mode.
-#
-IF(P4EST_DIR
- AND EXISTS ${P4EST_DIR}/DEBUG
- AND EXISTS ${P4EST_DIR}/FAST)
- MESSAGE(STATUS "Found old-style p4est directory layout")
- SET (P4EST_DIR ${P4EST_DIR}/FAST)
-ENDIF()
-
-
#
# Search for the sc library, usually bundled with p4est. If no SC_DIR was
# 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}/FAST
+ ${P4EST_DIR}/DEBUG
${P4EST_DIR}
PATH_SUFFIXES
p4est include/p4est include src
@@ -57,41 +49,101 @@ FIND_PATH(P4EST_INCLUDE_DIR p4est.h
FIND_PATH(SC_INCLUDE_DIR sc.h
HINTS
+ ${SC_DIR}/FAST
+ ${SC_DIR}/DEBUG
${SC_DIR}
+ ${P4EST_DIR}/FAST
+ ${P4EST_DIR}/DEBUG
${P4EST_DIR}
PATH_SUFFIXES
sc include/p4est include src sc/src
)
-FIND_LIBRARY(P4EST_LIBRARY
+FIND_LIBRARY(P4EST_LIBRARY_OPTIMIZED
NAMES p4est
HINTS
+ ${P4EST_DIR}/FAST
+ ${P4EST_DIR}/DEBUG
${P4EST_DIR}
PATH_SUFFIXES
lib${LIB_SUFFIX} lib64 lib src
)
-FIND_LIBRARY(SC_LIBRARY
+FIND_LIBRARY(P4EST_LIBRARY_DEBUG
+ NAMES p4est
+ HINTS
+ ${P4EST_DIR}/DEBUG
+ PATH_SUFFIXES
+ lib${LIB_SUFFIX} lib64 lib src
+ )
+
+FIND_LIBRARY(SC_LIBRARY_OPTIMIZED
NAMES sc
HINTS
+ ${SC_DIR}/FAST
+ ${SC_DIR}/DEBUG
${SC_DIR}
+ ${P4EST_DIR}/FAST
+ ${P4EST_DIR}/DEBUG
${P4EST_DIR}
PATH_SUFFIXES
lib${LIB_SUFFIX} lib64 lib src sc/src
)
-SET(_output ${P4EST_LIBRARY} ${SC_LIBRARY})
+FIND_LIBRARY(SC_LIBRARY_DEBUG
+ NAMES sc
+ HINTS
+ ${SC_DIR}/DEBUG
+ ${P4EST_DIR}/DEBUG
+ PATH_SUFFIXES
+ lib${LIB_SUFFIX} lib64 lib src sc/src
+ )
+
+SET(_output ${P4EST_LIBRARY_OPTMIZED} ${SC_LIBRARY_OPTIMIZED})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(P4EST DEFAULT_MSG
- P4EST_LIBRARY
- SC_LIBRARY
+ _output # Cosmetic: Gives nice output
+ P4EST_LIBRARY_OPTIMIZED
+ SC_LIBRARY_OPTIMIZED
P4EST_INCLUDE_DIR
SC_INCLUDE_DIR
)
+MARK_AS_ADVANCED(
+ P4EST_LIBRARY_OPTIMIZED
+ P4EST_LIBRARY_DEBUG
+ P4EST_INCLUDE_DIR
+ SC_LIBRARY_OPTIMIZED
+ SC_LIBRARY_DEBUG
+ SC_INCLUDE_DIR
+ )
+
+
IF(P4EST_FOUND)
- SET(P4EST_LIBRARIES
- ${P4EST_LIBRARY}
- ${SC_LIBRARY}
+
+ IF( ( "${P4EST_LIBRARY_OPTIMIZED}" STREQUAL "${P4EST_LIBRARY_DEBUG}"
+ AND
+ "${SC_LIBRARY_OPTIMIZED}" STREQUAL "${SC_LIBRARY_DEBUG}" )
+ OR P4EST_LIBRARY_DEBUG MATCHES "-NOTFOUND"
+ OR SC_LIBRARY_DEBUG MATCHES "-NOTFOUND" )
+ SET(P4EST_LIBRARIES
+ ${P4EST_LIBRARY_OPTIMIZED}
+ ${SC_LIBRARY_OPTIMIZED}
+ )
+ ELSE()
+ SET(P4EST_LIBRARIES
+ optimized
+ ${P4EST_LIBRARY_OPTIMIZED}
+ ${SC_LIBRARY_OPTIMIZED}
+ debug
+ ${P4EST_LIBRARY_DEBUG}
+ ${SC_LIBRARY_DEBUG}
+ general
+ )
+ ENDIF()
+
+ LIST(APPEND P4EST_LIBRARIES
+ ${LAPACK_LIBRARIES} # for good measure
+ ${MPI_C_LIBRARIES} # for good measure
)
SET(P4EST_INCLUDE_DIRS
${P4EST_INCLUDE_DIR}
@@ -106,16 +158,41 @@ IF(P4EST_FOUND)
IF("${P4EST_MPI_STRING}" STREQUAL "")
SET(P4EST_WITH_MPI FALSE)
ELSE()
+
SET(P4EST_WITH_MPI TRUE)
ENDIF()
- MARK_AS_ADVANCED(
- P4EST_DIR
- P4EST_LIBRARY
- P4EST_INCLUDE_DIR
- SC_LIBRARY
- SC_INCLUDE_DIR
- )
+ #
+ # 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}")
+
+ # Now for the patch number such as in 0.3.4.1. If there
+ # is no patch number, then the REGEX REPLACE will fail,
+ # setting P4EST_VERSION_PATCH to P4EST_VERSION. If that
+ # is the case, then set the patch number to zero
+ STRING(REGEX REPLACE
+ "^[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)?.*$" "\\1"
+ P4EST_VERSION_PATCH "${P4EST_VERSION}")
+ IF(${P4EST_VERSION_PATCH} STREQUAL "${P4EST_VERSION}")
+ SET(P4EST_VERSION_PATCH "0")
+ ENDIF()
+
+
+ MARK_AS_ADVANCED(P4EST_DIR)
ELSE()
SET(P4EST_DIR "" CACHE PATH
"An optional hint to a p4est installation/directory"
diff --git a/deal.II/cmake/modules/FindPETSC.cmake b/deal.II/cmake/modules/FindPETSC.cmake
index b3fddfac03..3bd673927c 100644
--- a/deal.II/cmake/modules/FindPETSC.cmake
+++ b/deal.II/cmake/modules/FindPETSC.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Try to find the petsc library
@@ -44,26 +46,88 @@ FIND_LIBRARY(PETSC_LIBRARY
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
+#
+# Search for the first part of the includes:
+#
+
+FIND_PATH(PETSC_INCLUDE_DIR_ARCH petscconf.h
+ HINTS
+ # petsc is special. Account for that
+ ${PETSC_DIR}
+ ${PETSC_DIR}/${PETSC_ARCH}
+ ${PETSC_INCLUDE_DIRS}
+ PATH_SUFFIXES petsc include include/petsc
+)
+
+#
+# Sometimes, this is not enough...
+# If petsc is not installed but in source tree layout, there will be
+# ${PETSC_DIR}/${PETSC_ARCH}/include - which we should have found by now.
+# ${PETSC_DIR}/include - which we still have to find.
+#
+# Or it is installed in a non standard layout in the system (e.g. in
+# Gentoo), where there will be
+# ${PETSC_DIR}/${PETSC_ARCH}/include
+# /usr/include/petsc ...
+#
+# Either way, we must be able to find petscversion.h:
+#
+
+FIND_PATH(PETSC_INCLUDE_DIR_COMMON petscversion.h
+ HINTS
+ ${PETSC_DIR}
+ ${PETSC_DIR}/${PETSC_ARCH}
+ ${PETSC_INCLUDE_DIRS}
+ PATH_SUFFIXES petsc include include/petsc
+)
#
# So, up to this point it was easy. Now, the tricky part. Search for
-# petscvariables and determine the link interface from that file:
+# petscvariables and determine the includes and the link interface from
+# that file:
#
+
FIND_FILE(PETSC_PETSCVARIABLES
NAMES petscvariables
HINTS
- ${PETSC_DIR}
${PETSC_DIR}/${PETSC_ARCH}
+ ${PETSC_DIR}
PATH_SUFFIXES conf
)
IF(NOT PETSC_PETSCVARIABLES MATCHES "-NOTFOUND")
+ #
+ # Includes:
+ #
+
+ FILE(STRINGS "${PETSC_PETSCVARIABLES}" _external_includes
+ REGEX "^PETSC_CC_INCLUDES =.*")
+ SEPARATE_ARGUMENTS(_external_includes)
+
+ SET(_petsc_includes)
+ FOREACH(_token ${_external_includes})
+ IF(_token MATCHES "^-I")
+ STRING(REGEX REPLACE "^-I" "" _token "${_token}")
+ LIST(APPEND _petsc_includes ${_token})
+ ENDIF()
+ ENDFOREACH()
+
+ # Remove petsc's own include directories:
+ IF(NOT "${_petsc_includes}" STREQUAL "")
+ LIST(REMOVE_AT _petsc_includes 0 1)
+ ENDIF()
+
+ #
+ # Link line:
+ #
+
FILE(STRINGS "${PETSC_PETSCVARIABLES}" _external_link_line
REGEX "^PETSC_WITH_EXTERNAL_LIB =.*")
SEPARATE_ARGUMENTS(_external_link_line)
SET(_hints)
+ SET(_petsc_libraries)
FOREACH(_token ${_external_link_line}})
IF(_token MATCHES "^-L")
# Build up hints with the help of all tokens passed with -L:
@@ -75,7 +139,7 @@ IF(NOT PETSC_PETSCVARIABLES MATCHES "-NOTFOUND")
IF(NOT _token MATCHES "(petsc|stdc\\+\\+|gcc_s)")
FIND_LIBRARY(PETSC_LIBRARY_${_token}
NAMES ${_token}
- HINTS ${_hintes}
+ HINTS ${_hints}
)
IF(NOT PETSC_LIBRARY_${_token} MATCHES "-NOTFOUND")
LIST(APPEND _petsc_libraries ${PETSC_LIBRARY_${_token}})
@@ -88,41 +152,10 @@ IF(NOT PETSC_PETSCVARIABLES MATCHES "-NOTFOUND")
ENDIF()
ENDIF()
ENDFOREACH()
+
ENDIF()
-#
-# Search for the first part of the includes:
-#
-FIND_PATH(PETSC_INCLUDE_DIR_ARCH petscconf.h
- HINTS
- # petsc is special. Account for that
- ${PETSC_DIR}
- ${PETSC_DIR}/${PETSC_ARCH}
- ${PETSC_INCLUDE_DIRS}
- PATH_SUFFIXES petsc include include/petsc
-)
-
-#
-# Sometimes, this is not enough...
-# If petsc is not installed but in source tree layout, there will be
-# ${PETSC_DIR}/${PETSC_ARCH}/include - which we should have found by now.
-# ${PETSC_DIR}/include - which we still have to find.
-#
-# Or it is installed in a non standard layout in the system (e.g. in
-# Gentoo), where there will be
-# ${PETSC_DIR}/${PETSC_ARCH}/include
-# /usr/include/petsc ...
-#
-# Either way, we must be able to find petscversion.h:
-#
-FIND_PATH(PETSC_INCLUDE_DIR_COMMON petscversion.h
- HINTS
- ${PETSC_DIR}
- ${PETSC_DIR}/${PETSC_ARCH}
- ${PETSC_INCLUDE_DIRS}
- PATH_SUFFIXES petsc include include/petsc
-)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PETSC DEFAULT_MSG
PETSC_LIBRARY
@@ -130,14 +163,23 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(PETSC DEFAULT_MSG
PETSC_INCLUDE_DIR_COMMON
)
+MARK_AS_ADVANCED(
+ PETSC_INCLUDE_DIR_ARCH
+ PETSC_INCLUDE_DIR_COMMON
+ PETSC_INCLUDE_DIRS
+ PETSC_LIBRARY
+ PETSC_PETSCVARIABLES
+ )
+
IF(PETSC_FOUND)
SET(PETSC_LIBRARIES
${PETSC_LIBRARY}
${_petsc_libraries}
)
SET(PETSC_INCLUDE_DIRS
- ${PETSC_INCLUDE_DIR_ARCH}
${PETSC_INCLUDE_DIR_COMMON}
+ ${PETSC_INCLUDE_DIR_ARCH}
+ ${_petsc_includes}
)
SET(PETSC_PETSCCONF_H "${PETSC_INCLUDE_DIR_ARCH}/petscconf.h")
@@ -189,17 +231,11 @@ 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
- PETSC_INCLUDE_DIR_ARCH
- PETSC_INCLUDE_DIR_COMMON
- PETSC_INCLUDE_DIRS
- PETSC_LIBRARY
- PETSC_PETSCVARIABLES
- )
+ MARK_AS_ADVANCED(PETSC_ARCH PETSC_DIR)
ELSE()
SET(PETSC_DIR "" CACHE PATH
"An optional hint to a PETSc directory"
diff --git a/deal.II/cmake/modules/FindSCALAPACK.cmake b/deal.II/cmake/modules/FindSCALAPACK.cmake
index 5b06ce3233..96a6a539b3 100644
--- a/deal.II/cmake/modules/FindSCALAPACK.cmake
+++ b/deal.II/cmake/modules/FindSCALAPACK.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Try to find the SCALAPACK library
@@ -39,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
@@ -49,7 +51,7 @@ FIND_PACKAGE(LAPACK)
FOREACH(_lib blacs blacsCinit blacsF77init)
STRING(TOUPPER "${_lib}" _lib_upper)
FIND_LIBRARY(${_lib_upper}_LIBRARY
- NAMES ${_lib} ${_lib}_MPI-LINUX-0
+ NAMES ${_lib} ${_lib}_MPI-LINUX-0 ${_lib}_MPI-DARWIN-0
HINTS
${BLACS_DIR}
${SCALAPACK_DIR}
@@ -71,27 +73,28 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SCALAPACK DEFAULT_MSG
LAPACK_FOUND
)
+MARK_AS_ADVANCED(
+ lapack_LIBRARY
+ atlas_LIBRARY
+ blas_LIBRARY
+ SCALAPACK_LIBRARY
+ BLACS_LIBRARY
+ BLACSCINIT_LIBRARY
+ BLACSF77INIT_LIBRARY
+ )
+
IF(SCALAPACK_FOUND)
SET(SCALAPACK_LIBRARIES
${SCALAPACK_LIBRARY}
${LAPACK_LIBRARIES}
${BLACS_LIBRARIES}
+ ${MPI_Fortran_LIBRARIES} # for good measure
)
SET(SCALAPACK_LINKER_FLAGS
${LAPACK_LINKER_FLAGS}
)
- MARK_AS_ADVANCED(
- lapack_LIBRARY
- atlas_LIBRARY
- blas_LIBRARY
- SCALAPACK_DIR
- SCALAPACK_LIBRARY
- BLACS_DIR
- BLACS_LIBRARY
- BLACSCINIT_LIBRARY
- BLACSF77INIT_LIBRARY
- )
+ MARK_AS_ADVANCED(SCALAPACK_DIR BLACS_DIR)
ELSE()
SET(SCALAPACK_DIR "" CACHE PATH
"An optional hint to a SCALAPACK directory"
diff --git a/deal.II/cmake/modules/FindSLEPC.cmake b/deal.II/cmake/modules/FindSLEPC.cmake
index b4c5c04676..9de3500f45 100644
--- a/deal.II/cmake/modules/FindSLEPC.cmake
+++ b/deal.II/cmake/modules/FindSLEPC.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Try to find the SLEPC library
@@ -75,6 +77,14 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SLEPC DEFAULT_MSG
PETSC_FOUND
)
+MARK_AS_ADVANCED(
+ SLEPC_DIR
+ SLEPC_INCLUDE_DIR_ARCH
+ SLEPC_INCLUDE_DIR_COMMON
+ SLEPC_INCLUDE_DIRS
+ SLEPC_LIBRARY
+ )
+
IF(SLEPC_FOUND)
SET(SLEPC_INCLUDE_DIRS
${SLEPC_INCLUDE_DIR_ARCH}
@@ -111,15 +121,11 @@ 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
- SLEPC_INCLUDE_DIR_ARCH
- SLEPC_INCLUDE_DIR_COMMON
- SLEPC_INCLUDE_DIRS
- SLEPC_LIBRARY
- )
+ MARK_AS_ADVANCED(SLEPC_DIR)
ELSE()
SET(SLEPC_DIR "" CACHE PATH
"An optional hint to a SLEPC directory"
diff --git a/deal.II/cmake/modules/FindTBB.cmake b/deal.II/cmake/modules/FindTBB.cmake
index b3bc3ad288..4c45373cec 100644
--- a/deal.II/cmake/modules/FindTBB.cmake
+++ b/deal.II/cmake/modules/FindTBB.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Try to find the Threading Building Blocks library
@@ -57,8 +59,13 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB DEFAULT_MSG
TBB_INCLUDE_DIR
)
+MARK_AS_ADVANCED(
+ TBB_LIBRARY
+ TBB_DEBUG_LIBRARY
+ TBB_INCLUDE_DIR
+ )
+
IF(TBB_FOUND)
- MARK_AS_ADVANCED(TBB_LIBRARY TBB_DEBUG_LIBRARY TBB_INCLUDE_DIR)
IF(NOT TBB_DEBUG_LIBRARY MATCHES "-NOTFOUND")
SET(TBB_WITH_DEBUGLIB TRUE)
@@ -69,8 +76,8 @@ IF(TBB_FOUND)
SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
+ MARK_AS_ADVANCED(TBB_DIR)
ELSE()
-
SET(TBB_DIR "" CACHE PATH
"An optional hint to a TBB installation"
)
diff --git a/deal.II/cmake/modules/FindTRILINOS.cmake b/deal.II/cmake/modules/FindTRILINOS.cmake
index d038db322a..f36c514ed0 100644
--- a/deal.II/cmake/modules/FindTRILINOS.cmake
+++ b/deal.II/cmake/modules/FindTRILINOS.cmake
@@ -1,29 +1,34 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Try to find the Trilinos library
#
# 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)
@@ -31,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
+#
+# Just search for the file:
#
-FIND_PACKAGE(TRILINOS_CONFIG
- CONFIG QUIET
- NAMES Trilinos TRILINOS
+FIND_FILE(TRILINOS_CONFIG
+ NAMES TrilinosConfig.cmake trilinos-config.cmake
HINTS
- ${TRILINOS_DIR}/lib/cmake/Trilinos
${TRILINOS_DIR}
PATH_SUFFIXES
lib64/cmake/Trilinos
@@ -48,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
@@ -56,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}
@@ -67,25 +141,37 @@ FOREACH(_library ${Trilinos_LIBRARIES})
NO_CMAKE_FIND_ROOT_PATH
)
- LIST(APPEND TRILINOS_LIBRARIES ${TRILINOS_LIBRARY_${_library}})
+ MARK_AS_ADVANCED(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()
+#
+# Add the link interface:
+#
+LIST(APPEND TRILINOS_LIBRARIES
+ ${Trilinos_TPL_LIBRARIES}
+ ${MPI_CXX_LIBRARIES} # for good measure
+ )
+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TRILINOS DEFAULT_MSG
TRILINOS_LIBRARIES # cosmetic: Gives nice output
TRILINOS_CONFIG_FOUND
)
+MARK_AS_ADVANCED(TRILINOS_CONFIG EPETRA_CONFIG_H)
+
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}")
@@ -101,15 +187,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 "")
@@ -132,13 +209,44 @@ 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}")
- MARK_AS_ADVANCED(
- TRILINOS_DIR
- TRILINOS_CONFIG_DIR
+ 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
diff --git a/deal.II/cmake/modules/FindUMFPACK.cmake b/deal.II/cmake/modules/FindUMFPACK.cmake
index 029e8708db..746fdf0143 100644
--- a/deal.II/cmake/modules/FindUMFPACK.cmake
+++ b/deal.II/cmake/modules/FindUMFPACK.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Try to find the UMFPACK library
@@ -34,7 +36,8 @@ ENDFOREACH()
# TODO: There might be an external dependency for metis, ignore this for
# now.
#
-FIND_PACKAGE(LAPACK)
+FIND_PACKAGE(DEALII_LAPACK)
+FIND_PACKAGE(METIS)
#
# Two macros to make life easier:
@@ -103,9 +106,11 @@ FIND_UMFPACK_LIBRARY(UMFPACK umfpack REQUIRED)
FIND_UMFPACK_LIBRARY(AMD amd REQUIRED)
FIND_UMFPACK_LIBRARY(CHOLMOD cholmod)
FIND_UMFPACK_LIBRARY(COLAMD colamd)
+FIND_UMFPACK_LIBRARY(CCOLAMD ccolamd)
+FIND_UMFPACK_LIBRARY(CAMD camd)
FIND_UMFPACK_LIBRARY(SuiteSparse_config suitesparseconfig)
-SET(_output ${UMFPACK_LIBRARY} ${CHOLMOD_LIBRARY} ${COLAMD_LIBRARY} ${AMD_LIBRARY} ${SuiteSparse_config_LIBRARY})
+SET(_output ${UMFPACK_LIBRARY} ${CHOLMOD_LIBRARY} ${CCOLAMD_LIBRARY} ${COLAMD_LIBRARY} ${CAMD_LIBRARY} ${AMD_LIBRARY} ${SuiteSparse_config_LIBRARY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UMFPACK DEFAULT_MSG
_output # Cosmetic: Gives nice output
UMFPACK_LIBRARY
@@ -116,27 +121,54 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(UMFPACK DEFAULT_MSG
LAPACK_FOUND
)
+MARK_AS_ADVANCED(
+ AMD_INCLUDE_DIR
+ AMD_LIBRARY
+ atlas_LIBRARY
+ blas_LIBRARY
+ CAMD_LIBRARY
+ CHOLMOD_LIBRARY
+ CCOLAMD_LIBRARY
+ COLAMD_LIBRARY
+ SuiteSparse_config_INCLUDE_DIR
+ SuiteSparse_config_LIBRARY
+ UMFPACK_INCLUDE_DIR
+ UMFPACK_LIBRARY
+ )
+
IF(UMFPACK_FOUND)
SET(UMFPACK_LIBRARIES
${UMFPACK_LIBRARY}
${CHOLMOD_LIBRARY}
+ ${CCOLAMD_LIBRARY}
${COLAMD_LIBRARY}
+ ${CAMD_LIBRARY}
${AMD_LIBRARY}
${SuiteSparse_config_LIBRARY}
- ${LAPACK_LIBRARIES}
)
+ #
+ # For good measure:
+ #
+ IF(METIS_FOUND)
+ LIST(APPEND UMFPACK_LIBRARIES ${METIS_LIBRARIES})
+ ENDIF()
+
+ LIST(APPEND UMFPACK_LIBRARIES ${LAPACK_LIBRARIES})
+
#
# Add rt to the link interface as well (for whatever reason,
# libsuitesparse.so depends on clock_gettime but the shared
# lib does not record its dependence on librt.so as evidenced
# by ldd :-( ):
#
- FIND_LIBRARY(rt_lib NAMES rt)
- MARK_AS_ADVANCED(rt_lib)
- IF(NOT rt_lib MATCHES "-NOTFOUND")
- LIST(APPEND UMFPACK_LIBRARIES ${rt_lib})
+ SWITCH_LIBRARY_PREFERENCE()
+ FIND_LIBRARY(rt_LIBRARY NAMES rt)
+ SWITCH_LIBRARY_PREFERENCE()
+ MARK_AS_ADVANCED(rt_LIBRARY)
+ IF(NOT rt_LIBRARY MATCHES "-NOTFOUND")
+ LIST(APPEND UMFPACK_LIBRARIES ${rt_LIBRARY})
ENDIF()
SET(UMFPACK_INCLUDE_DIRS
@@ -148,20 +180,7 @@ IF(UMFPACK_FOUND)
${LAPACK_LINKER_FLAGS}
)
- MARK_AS_ADVANCED(
- atlas_LIBRARY
- blas_LIBRARY
- UMFPACK_LIBRARY
- AMD_LIBRARY
- CHOLMOD_LIBRARY
- COLAMD_LIBRARY
- SuiteSparse_config_LIBRARY
- UMFPACK_INCLUDE_DIR
- AMD_INCLUDE_DIR
- SuiteSparse_config_INCLUDE_DIR
- UMFPACK_DIR
- SUITESPARSE_DIR
- )
+ MARK_AS_ADVANCED(UMFPACK_DIR SUITESPARSE_DIR)
ELSE()
SET(UMFPACK_DIR "" CACHE PATH
"An optional hint to an UMFPACK directory"
diff --git a/deal.II/cmake/scripts/CMakeLists.txt b/deal.II/cmake/scripts/CMakeLists.txt
index 80272980de..96539b7835 100644
--- a/deal.II/cmake/scripts/CMakeLists.txt
+++ b/deal.II/cmake/scripts/CMakeLists.txt
@@ -1,25 +1,35 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
-ADD_EXECUTABLE(expand_instantiations expand_instantiations.cc)
IF(NOT CMAKE_CROSSCOMPILING)
- #
- # Export expand_instantiations for use in cross compilation:
- #
+ ADD_EXECUTABLE(expand_instantiations expand_instantiations.cc)
+
+ IF(DEAL_II_COMPONENT_COMPAT_FILES)
+ SET_TARGET_PROPERTIES(expand_instantiations
+ PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/common/scripts
+ )
+ INSTALL(TARGETS expand_instantiations
+ EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
+ DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts
+ COMPONENT compat_files
+ )
+ ENDIF()
+
EXPORT(TARGETS expand_instantiations
- FILE ${CMAKE_CURRENT_BINARY_DIR}/importExecutables.cmake
- NAMESPACE native- # Prefix a namespace
+ FILE ${CMAKE_BINARY_DIR}/importExecutables.cmake
)
ENDIF()
@@ -28,10 +38,14 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
# Build and install the old dependency_resolution and report_features
# executables:
#
+
INCLUDE_DIRECTORIES(
BEFORE # Ensure deal.II include directories come first
- ${CMAKE_BINARY_DIR}/include/
+ #
+ # Reverse order due to BEFORE:
+ #
${CMAKE_SOURCE_DIR}/include/
+ ${CMAKE_BINARY_DIR}/include/
)
ADD_EXECUTABLE(make_dependencies make_dependencies.cc)
@@ -49,18 +63,41 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
ADD_EXECUTABLE(report_features
${CMAKE_CURRENT_BINARY_DIR}/report_features.cc
)
+
+ #
+ # Link report_features in the same way as the library/final executable:
+ #
TARGET_LINK_LIBRARIES(report_features ${DEAL_II_EXTERNAL_LIBRARIES})
SET_TARGET_PROPERTIES(report_features
PROPERTIES
- LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}"
+ LINK_FLAGS "${DEAL_II_LINKER_FLAGS}"
COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS}"
)
+ IF(DEAL_II_STATIC_EXECUTABLE)
+ SET_PROPERTY(TARGET report_features PROPERTY
+ LINK_SEARCH_END_STATIC TRUE
+ )
+ ENDIF()
+
+ #
+ # A custom target with the same name as the component:
+ #
+ ADD_CUSTOM_TARGET(compat_files
+ DEPENDS
+ expand_instantiations
+ make_dependencies
+ report_features
+ )
IF(NOT CMAKE_CROSSCOMPILING)
ADD_CUSTOM_TARGET(run_report_features COMMAND report_features)
ENDIF()
- INSTALL(TARGETS make_dependencies report_features expand_instantiations
+ SET_TARGET_PROPERTIES(make_dependencies report_features
+ PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/common/scripts
+ )
+
+ INSTALL(TARGETS make_dependencies report_features
EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts
COMPONENT compat_files
diff --git a/deal.II/cmake/scripts/expand_instantiations.cc b/deal.II/cmake/scripts/expand_instantiations.cc
index 8f62d4ed71..6f89828b70 100644
--- a/deal.II/cmake/scripts/expand_instantiations.cc
+++ b/deal.II/cmake/scripts/expand_instantiations.cc
@@ -1,15 +1,19 @@
-//---------------------------- expand_instantiations.cc -------------------
-// $Id$
-// Version: $Name$
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2007, 2008, 2009, 2010, 2011 by the deal.II authors
+// Copyright (C) 2007 - 2013 by the deal.II authors
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// This file is part of the deal.II library.
//
-//---------------------------- expand_instantiations.cc -------------------
+// 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 is the program that we use to generate explicit instantiations for a
// variety of template arguments. It takes two kinds of input files. The first
diff --git a/deal.II/cmake/scripts/make_dependencies.cc b/deal.II/cmake/scripts/make_dependencies.cc
index 1e6e2bb2f6..b7796338bf 100644
--- a/deal.II/cmake/scripts/make_dependencies.cc
+++ b/deal.II/cmake/scripts/make_dependencies.cc
@@ -1,15 +1,19 @@
-//---------------------------- make_dependencies.cc ------------------------
-// $Id$
-// Version: $Name$
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2003, 2007, 2008, 2010, 2011 by the deal.II authors
+// Copyright (C) 2003 - 2013 by the deal.II authors
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// This file is part of the deal.II library.
//
-//---------------------------- make_dependencies.cc ------------------------
+// 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.
+//
+// ---------------------------------------------------------------------
+
// Make a dependency file tree
// usage: make_depencies -Iinc_path1 -Iinc_path2 ... -Bbasepath files
diff --git a/deal.II/cmake/scripts/report_features.cc.in b/deal.II/cmake/scripts/report_features.cc.in
index 3b0c072a01..457d226e04 100644
--- a/deal.II/cmake/scripts/report_features.cc.in
+++ b/deal.II/cmake/scripts/report_features.cc.in
@@ -1,15 +1,18 @@
-//----------------------------------------------------------------------
-// $Id$
-// Version: $Name$
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011, 2012, 2013 by the deal.II authors
+// Copyright (C) 2010 - 2013 by the deal.II authors
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
#include
@@ -61,7 +64,7 @@ int main()
if(${_shared_libs})
std::cout << "dealii-feature: shared_libs=yes" << std::endl;
else
- std::cout << "dealii-feature: shared_libs=yes" << std::endl;
+ std::cout << "dealii-feature: shared_libs=no" << std::endl;
#ifdef DEAL_II_WITH_ARPACK
std::cout << "dealii-feature: ARPACK=yes" << std::endl;
diff --git a/deal.II/cmake/setup_cached_variables.cmake b/deal.II/cmake/setup_cached_variables.cmake
index 4213865644..c2e04fe20d 100644
--- a/deal.II/cmake/setup_cached_variables.cmake
+++ b/deal.II/cmake/setup_cached_variables.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Setup cached variables (prior to the PROJECT(deal.II) call)
@@ -30,31 +32,32 @@
#
# Options regarding compilation and linking:
#
+# CMAKE_BUILD_TYPE
# DEAL_II_ALLOW_PLATFORM_INTROSPECTION
# DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS
-# CMAKE_BUILD_TYPE
# BUILD_SHARED_LIBS
+# DEAL_II_PREFER_STATIC_LIBS
+# DEAL_II_STATIC_EXECUTABLE
# CMAKE_INSTALL_RPATH_USE_LINK_PATH
-# CMAKE_C_FLAGS
# CMAKE_CXX_FLAGS *)
-# CMAKE_SHARED_LINKER_FLAGS *)
+# DEAL_II_LINKER_FLAGS *)
# DEAL_II_CXX_FLAGS_DEBUG
-# DEAL_II_SHARED_LINKER_FLAGS_DEBUG
+# DEAL_II_LINKER_FLAGS_DEBUG
# DEAL_II_CXX_FLAGS_RELEASE
-# DEAL_II_SHARED_LINKER_FLAGS_RELEASE
+# DEAL_II_LINKER_FLAGS_RELEASE
# DEAL_II_WITH_64BIT_INDICES
#
-# *) May also be set via environment variable (CFLAGS, CXXFLAGS, LDFLAGS)
-# (nonempty cached variable has precedence will not be overwritten by
-# environment)
+# *) May also be set via environment variable (CXXFLAGS, LDFLAGS)
+# (a nonempty cached variable has precedence and will not be
+# overwritten by environment)
#
-###########################################################################
-# #
-# General configuration options: #
-# #
-###########################################################################
+########################################################################
+# #
+# General configuration options: #
+# #
+########################################################################
If(DEAL_II_HAVE_BUNDLED_DIRECTORY)
OPTION(DEAL_II_ALLOW_BUNDLED
@@ -109,23 +112,11 @@ IF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
ENDIF()
-###########################################################################
-# #
-# Compilation and linking: #
-# #
-###########################################################################
-
-OPTION(DEAL_II_ALLOW_PLATFORM_INTROSPECTION
- "Allow platform introspection for CPU command set, SSE and AVX"
- ON
- )
-MARK_AS_ADVANCED(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
-
-OPTION(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS
- "Configure sensible default CFLAGS and CXXFLAGS depending on platform, compiler and build target."
- ON
- )
-MARK_AS_ADVANCED(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
+########################################################################
+# #
+# Compilation and linking: #
+# #
+########################################################################
#
# Setup CMAKE_BUILD_TYPE:
@@ -148,10 +139,46 @@ IF( NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND
)
ENDIF()
+
+OPTION(DEAL_II_ALLOW_PLATFORM_INTROSPECTION
+ "Allow platform introspection for CPU command sets, SSE and AVX"
+ ON
+ )
+MARK_AS_ADVANCED(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
+
+OPTION(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS
+ "Configure sensible default CFLAGS and CXXFLAGS depending on platform, compiler and build target."
+ ON
+ )
+MARK_AS_ADVANCED(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
+
SET(BUILD_SHARED_LIBS "ON" CACHE BOOL
"Build a shared library"
)
-MARK_AS_ADVANCED(BUILD_SHARED_LIBS)
+
+OPTION(DEAL_II_PREFER_STATIC_LIBS
+ "Prefer static libraries over dynamic libraries when searching for features and corresponding link interface"
+ OFF
+ )
+MARK_AS_ADVANCED(DEAL_II_PREFER_STATIC_LIBS)
+
+OPTION(DEAL_II_STATIC_EXECUTABLE
+ "Provide a link interface that is suitable for static linkage of executables. Enabling this option forces BUILD_SHARED_LIBS=OFF and DEAL_II_PREFER_STATIC_LIBS=ON"
+ OFF
+ )
+MARK_AS_ADVANCED(DEAL_II_STATIC_EXECUTABLE)
+
+IF(DEAL_II_STATIC_EXECUTABLE)
+ SET(BUILD_SHARED_LIBS "OFF" CACHE BOOL
+ "Build a shared library"
+ FORCE
+ )
+ SET(DEAL_II_PREFER_STATIC_LIBS "ON" CACHE BOOL
+ "Prefer static libraries over dynamic libraries when searching for features and corresponding link interface"
+ FORCE
+ )
+ENDIF()
+
#
# Set CMAKE_INSTALL_RPATH_USE_LINK_PATH to default to ON and promote to
@@ -162,6 +189,7 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE BOOL
)
MARK_AS_ADVANCED(CMAKE_INSTALL_RPATH_USE_LINK_PATH)
+
#
# Define the variable that defines whether we should use 32- or 64-bit
# global DoF indices.
@@ -172,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)
@@ -184,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"
@@ -191,6 +219,7 @@ FOREACH(_flag
ENDIF()
ENDFOREACH()
+
#
# Hide all unused compiler flag variables:
#
@@ -203,6 +232,11 @@ FOREACH(_flag
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELWITHDEBINFO
+ CMAKE_Fortran_FLAGS_RELEASE
+ CMAKE_Fortran_FLAGS_DEBUG
+ CMAKE_Fortran_FLAGS_MINSIZEREL
+ CMAKE_Fortran_FLAGS_RELWITHDEBINFO
+ CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_RELEASE
@@ -212,17 +246,17 @@ FOREACH(_flag
SET(${_flag} "" CACHE INTERNAL "" FORCE)
ENDFOREACH()
+
#
# Set cached compiler flags to an empty string:
#
SET(DEAL_II_USED_FLAGS
- CMAKE_C_FLAGS
CMAKE_CXX_FLAGS
DEAL_II_CXX_FLAGS_DEBUG
DEAL_II_CXX_FLAGS_RELEASE
- CMAKE_SHARED_LINKER_FLAGS
- DEAL_II_SHARED_LINKER_FLAGS_DEBUG
- DEAL_II_SHARED_LINKER_FLAGS_RELEASE
+ DEAL_II_LINKER_FLAGS
+ DEAL_II_LINKER_FLAGS_DEBUG
+ DEAL_II_LINKER_FLAGS_RELEASE
)
FOREACH(_flag ${DEAL_II_USED_FLAGS})
@@ -250,40 +284,36 @@ ENDFOREACH()
#
-# Finally, read in CFLAGS, CXXFLAGS and LDFLAGS from environment and
-# prepend them to the saved variables:
+# Finally, read in CXXFLAGS and LDFLAGS from environment and prepend them
+# to the saved variables:
#
-SET(CMAKE_C_FLAGS_SAVED "$ENV{CFLAGS} ${CMAKE_C_FLAGS_SAVED}")
SET(CMAKE_CXX_FLAGS_SAVED "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_SAVED}")
-SET(CMAKE_SHARED_LINKER_FLAGS_SAVED "$ENV{LDFLAGS} ${CMAKE_SHARED_LINKER_FLAGS_SAVED}")
-UNSET(ENV{CFLAGS})
+SET(DEAL_II_LINKER_FLAGS_SAVED "$ENV{LDFLAGS} ${DEAL_II_LINKER_FLAGS_SAVED}")
UNSET(ENV{CXXFLAGS})
UNSET(ENV{LDFLAGS})
-###########################################################################
-# #
-# Miscellaneous setup: #
-# #
-###########################################################################
+########################################################################
+# #
+# Miscellaneous setup: #
+# #
+########################################################################
GET_CMAKE_PROPERTY(_res VARIABLES)
FOREACH(_var ${_res})
#
- # Rename WITH_* by DEAL_II_WITH_*
+ # Rename (ALLOW|WITH|FORCE|COMPONENT)_* by DEAL_II_(ALLOW|WITH|FORCE|COMPONENT)_*
#
- IF(_var MATCHES "^WITH_")
- SET(DEAL_II_${_var} ${${_var}} CACHE BOOL "" FORCE)
- UNSET(${_var} CACHE)
- ENDIF()
+ FOREACH(_match ALLOW_ WITH_ FORCE_ COMPONENT_)
+ IF(_var MATCHES "^${_match}")
+ SET(DEAL_II_${_var} ${${_var}} CACHE BOOL "" FORCE)
+ UNSET(${_var} CACHE)
+ ENDIF()
+ ENDFOREACH()
#
# Same for components:
#
- IF(_var MATCHES "^COMPONENT_")
- SET(DEAL_II_${_var} ${${_var}} CACHE BOOL "" FORCE)
- UNSET(${_var} CACHE)
- ENDIF()
IF(_var MATCHES "^(COMPAT_FILES|DOCUMENTATION|EXAMPLES|MESH_CONVERTER|PARAMETER_GUI)")
SET(DEAL_II_COMPONENT_${_var} ${${_var}} CACHE BOOL "" FORCE)
UNSET(${_var} CACHE)
diff --git a/deal.II/cmake/setup_compiler_flags.cmake b/deal.II/cmake/setup_compiler_flags.cmake
index db784362b4..f82147f9e8 100644
--- a/deal.II/cmake/setup_compiler_flags.cmake
+++ b/deal.II/cmake/setup_compiler_flags.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Setup default compiler flags: This file sets up sensible default compiler
@@ -28,15 +30,15 @@
# CMAKE_CXX_FLAGS
# DEAL_II_CXX_FLAGS_DEBUG
# DEAL_II_CXX_FLAGS_RELEASE
-# CMAKE_SHARED_LINKER_FLAGS
-# DEAL_II_SHARED_LINKER_FLAGS_DEBUG
-# DEAL_II_SHARED_LINKER_FLAGS_RELEASE
+# DEAL_II_LINKER_FLAGS
+# DEAL_II_LINKER_FLAGS_DEBUG
+# DEAL_II_LINKER_FLAGS_RELEASE
#
# All modifications shall be guarded with the ENABLE_IF_SUPPORTED
# or ENABLE_IF_LINKS macro, e.g.
#
# ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic")
-# ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+# ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
#
# Checks for compiler features (such as C++11 support) and compiler
# specific bugs that
@@ -54,75 +56,44 @@
#
-###########################################################################
-# #
-# Sanity checks: #
-# #
-###########################################################################
+########################################################################
+# #
+# Sanity checks: #
+# #
+########################################################################
#
-# Check the user provided C and CXX flags:
+# Check the user provided CXX flags:
#
-IF(NOT "${CMAKE_C_FLAGS_SAVED}" STREQUAL "${DEAL_II_C_FLAGS_SAVED}")
- UNSET(DEAL_II_HAVE_USABLE_C_FLAGS CACHE)
-ENDIF()
-SET(DEAL_II_C_FLAGS_SAVED "${CMAKE_C_FLAGS_SAVED}" CACHE INTERNAL "" FORCE)
-
-SET(CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS_SAVED}")
-CHECK_C_SOURCE_COMPILES(
- "int main(){ return 0; }"
- DEAL_II_HAVE_USABLE_C_FLAGS)
-SET(CMAKE_REQUIRED_FLAGS "")
-
-IF(NOT DEAL_II_HAVE_USABLE_C_FLAGS)
- UNSET(DEAL_II_HAVE_USABLE_C_FLAGS CACHE)
- MESSAGE(FATAL_ERROR "\n"
- "Configuration error: Cannot compile with the specified C flags: "
- "${CMAKE_C_FLAGS_SAVED}\n"
- )
-ENDIF()
-
-
+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()
-#
-# CMAKE_C_COMPILER and CMAKE_CXX_COMPILER have to be of the same brand.
-#
-IF(NOT ( "${CMAKE_C_COMPILER_ID}" STREQUAL "${CMAKE_CXX_COMPILER_ID}" AND
- "${CMAKE_C_COMPILER_VERSION}" STREQUAL "${CMAKE_CXX_COMPILER_VERSION}" ) )
- MESSAGE(FATAL_ERROR "\n"
- "Configuration error: The specified C and CXX compiler have to be of the "
- "same family, but cmake found:\n"
- "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}\n"
- "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}\n"
- )
-ENDIF()
-
-
-###########################################################################
-# #
-# Compiler setup: #
-# #
-###########################################################################
+########################################################################
+# #
+# Compiler setup: #
+# #
+########################################################################
IF(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
#
diff --git a/deal.II/cmake/setup_compiler_flags_gnu.cmake b/deal.II/cmake/setup_compiler_flags_gnu.cmake
index 0b35afc511..14884e265d 100644
--- a/deal.II/cmake/setup_compiler_flags_gnu.cmake
+++ b/deal.II/cmake/setup_compiler_flags_gnu.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# General setup for GCC and compilers sufficiently close to GCC
@@ -51,7 +53,7 @@ ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic")
# Check whether the -as-needed flag is available. If so set it to link
# the deal.II library with it.
#
-ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
#
# Setup various warnings:
@@ -71,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
#
@@ -79,6 +87,11 @@ ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-deprecated-declarations")
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ #
+ # Silence Clang warnings about unused parameters:
+ #
+ SET(CMAKE_CXX_FLAGS "-Qunused-arguments ${CMAKE_CXX_FLAGS}")
+
#
# *Boy*, clang seems to be the very definition of "pedantic" in
# "-pedantic" mode, so disable a bunch of harmless warnings
@@ -95,6 +108,16 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
ENDIF()
+IF(DEAL_II_STATIC_EXECUTABLE)
+ #
+ # To produce a static executable, we have to statically link libstdc++
+ # and gcc's support libraries and glibc:
+ #
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-static")
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-pthread")
+ENDIF()
+
+
#############################
# #
# For Release target: #
@@ -108,6 +131,7 @@ IF (CMAKE_BUILD_TYPE MATCHES "Release")
ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O2")
ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-loops")
+ ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-all-loops")
ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-fstrict-aliasing")
ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-felide-constructors")
@@ -126,16 +150,22 @@ IF (CMAKE_BUILD_TYPE MATCHES "Debug")
LIST(APPEND DEAL_II_DEFINITIONS_DEBUG "DEBUG")
LIST(APPEND DEAL_II_USER_DEFINITIONS_DEBUG "DEBUG")
- ADD_FLAGS(DEAL_II_CXX_FLAGS_DEBUG "-O0")
+ ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-Og")
+ #
+ # If -Og is not available, fall back to -O0:
+ #
+ IF(NOT DEAL_II_HAVE_FLAG_Og)
+ ADD_FLAGS(DEAL_II_CXX_FLAGS_DEBUG "-O0")
+ ENDIF()
ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-ggdb")
- ENABLE_IF_SUPPORTED(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-ggdb")
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS_DEBUG "-ggdb")
#
# If -ggdb is not available, fall back to -g:
#
IF(NOT DEAL_II_HAVE_FLAG_ggdb)
ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-g")
- ENABLE_IF_SUPPORTED(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-g")
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS_DEBUG "-g")
ENDIF()
ENDIF()
diff --git a/deal.II/cmake/setup_compiler_flags_intel.cmake b/deal.II/cmake/setup_compiler_flags_intel.cmake
index 1c82c3ef5c..ed67d96ad3 100644
--- a/deal.II/cmake/setup_compiler_flags_intel.cmake
+++ b/deal.II/cmake/setup_compiler_flags_intel.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# General setup for the Intel C++ Compiler
@@ -42,7 +44,7 @@ ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic")
# Check whether the -as-needed flag is available. If so set it to link
# the deal.II library with it.
#
-ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
#
# Set ansi mode:
@@ -80,6 +82,18 @@ ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd1478")
ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd1572")
+IF(DEAL_II_STATIC_EXECUTABLE)
+ #
+ # To produce a static executable, we have to statically link intel's
+ # support libraries:
+ #
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-static")
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-static-intel")
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-static-gcc")
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-pthread")
+ENDIF()
+
+
#############################
# #
# For Release target: #
@@ -90,11 +104,24 @@ IF (CMAKE_BUILD_TYPE MATCHES "Release")
#
# General optimization flags:
#
- ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O2")
+
+ 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_compiler_flags_msvc.cmake b/deal.II/cmake/setup_compiler_flags_msvc.cmake
index b8871633f5..6aeaceb16d 100644
--- a/deal.II/cmake/setup_compiler_flags_msvc.cmake
+++ b/deal.II/cmake/setup_compiler_flags_msvc.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Timo Heister
-##
-#####
+## ---------------------------------------------------------------------
#
# General setup for the Microsoft Visual Studio C++ Compiler (Windows)
diff --git a/deal.II/cmake/setup_custom_targets.cmake b/deal.II/cmake/setup_custom_targets.cmake
deleted file mode 100644
index 2f7b56efa8..0000000000
--- a/deal.II/cmake/setup_custom_targets.cmake
+++ /dev/null
@@ -1,44 +0,0 @@
-#####
-##
-## Copyright (C) 2012, 2013 by the deal.II authors
-##
-## This file is part of the deal.II library.
-##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
-##
-## Author: Matthias Maier
-##
-#####
-
-#
-# Setup some convenience custom targets for the build system:
-#
-
-
-###########################################################################
-# #
-# Custom targets for library, documentation and compat_files components: #
-# #
-###########################################################################
-
-ADD_CUSTOM_TARGET(library)
-FOREACH(_build ${DEAL_II_BUILD_TYPES})
- ADD_DEPENDENCIES(library ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX})
-ENDFOREACH()
-
-IF(DEAL_II_COMPONENT_DOCUMENTATION)
- ADD_CUSTOM_TARGET(documentation
- DEPENDS doxygen
- )
-ENDIF()
-
-IF(DEAL_II_COMPONENT_COMPAT_FILES)
- ADD_CUSTOM_TARGET(compat_files
- DEPENDS
- expand_instantiations
- make_dependencies
- report_features
- )
-ENDIF()
diff --git a/deal.II/cmake/setup_deal_ii.cmake b/deal.II/cmake/setup_deal_ii.cmake
index 5b82eedd22..a07c54f465 100644
--- a/deal.II/cmake/setup_deal_ii.cmake
+++ b/deal.II/cmake/setup_deal_ii.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Set up deal.II specific definitions
@@ -49,17 +51,15 @@
# 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<...>
#
-###########################################################################
-# #
-# General information about deal.II: #
-# #
-###########################################################################
+########################################################################
+# #
+# General information about deal.II: #
+# #
+########################################################################
SET_IF_EMPTY(DEAL_II_PACKAGE_NAME "deal.II")
@@ -83,11 +83,11 @@ STRING(REGEX REPLACE
SET(DEAL_II_VERSION ${DEAL_II_VERSION_MAJOR}.${DEAL_II_VERSION_MINOR})
-###########################################################################
-# #
-# Information about paths, install locations and names: #
-# #
-###########################################################################
+########################################################################
+# #
+# Information about paths, install locations and names: #
+# #
+########################################################################
SET(DEAL_II_PROJECT_CONFIG_NAME "${DEAL_II_PACKAGE_NAME}")
@@ -110,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")
@@ -144,41 +144,3 @@ IF(CMAKE_BUILD_TYPE MATCHES "Release")
LIST(APPEND DEAL_II_BUILD_TYPES "RELEASE")
ENDIF()
-
-###########################################################################
-# #
-# Cleanup and Includes that have 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()
-
-
-#
-# 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_external_macros.cmake b/deal.II/cmake/setup_external_macros.cmake
index f5c3a150a1..89dc60e9e4 100644
--- a/deal.II/cmake/setup_external_macros.cmake
+++ b/deal.II/cmake/setup_external_macros.cmake
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
#
# Include all external (cmake) macros that we will use:
@@ -18,7 +20,6 @@
INCLUDE(CheckCXXCompilerFlag)
INCLUDE(CheckCXXSourceCompiles)
-INCLUDE(CheckCSourceCompiles)
INCLUDE(CheckCXXSourceRuns)
INCLUDE(CheckCXXSymbolExists)
INCLUDE(CheckIncludeFileCXX)
diff --git a/deal.II/cmake/setup_finalize.cmake b/deal.II/cmake/setup_finalize.cmake
index fbf44de466..0584cc7696 100644
--- a/deal.II/cmake/setup_finalize.cmake
+++ b/deal.II/cmake/setup_finalize.cmake
@@ -1,23 +1,25 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
-###########################################################################
-# #
-# Finalize the configuration: #
-# #
-###########################################################################
+########################################################################
+# #
+# Finalize the configuration: #
+# #
+########################################################################
#
# Hide some cmake specific cached variables. This is annoying...
@@ -58,12 +60,36 @@ 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()
+FILE(WRITE
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_source_includes
+ ""
+ )
+
+#
+# Cleanup deal.IITargets.cmake in the build directory:
+#
+FILE(REMOVE
+ ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}BuildTargets.cmake
+ )
+
-###########################################################################
-# #
-# And write a nice configuration summary to file: #
-# #
-###########################################################################
+########################################################################
+# #
+# And write a nice configuration summary to file: #
+# #
+########################################################################
SET(_log_detailed "${CMAKE_BINARY_DIR}/detailed.log")
SET(_log_summary "${CMAKE_BINARY_DIR}/summary.log")
@@ -99,30 +125,36 @@ _both(
)
IF(CMAKE_CROSSCOMPILING)
_both(
- "# CROSSCOMPILING!\n"
+ "#\n# CROSSCOMPILING!\n"
"# DEAL_II_NATIVE: ${DEAL_II_NATIVE}\n"
)
ENDIF()
+IF(DEAL_II_STATIC_EXECUTABLE)
+ _both(
+ "#\n# STATIC LINKAGE!\n"
+ )
+ENDIF()
+
_both("#\n")
_detailed(
"# Compiler flags used for this build:
-# CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}
+# CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}
"
)
IF(CMAKE_BUILD_TYPE MATCHES "Release")
- _detailed("# DEAL_II_CXX_FLAGS_RELEASE: ${DEAL_II_CXX_FLAGS_RELEASE}\n")
+ _detailed("# DEAL_II_CXX_FLAGS_RELEASE: ${DEAL_II_CXX_FLAGS_RELEASE}\n")
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- _detailed("# DEAL_II_CXX_FLAGS_DEBUG: ${DEAL_II_CXX_FLAGS_DEBUG}\n")
+ _detailed("# DEAL_II_CXX_FLAGS_DEBUG: ${DEAL_II_CXX_FLAGS_DEBUG}\n")
ENDIF()
-_detailed("# CMAKE_SHARED_LINKER_FLAGS: ${CMAKE_SHARED_LINKER_FLAGS}\n")
+_detailed("# DEAL_II_LINKER_FLAGS: ${DEAL_II_LINKER_FLAGS}\n")
IF(CMAKE_BUILD_TYPE MATCHES "Release")
- _detailed("# DEAL_II_SHARED_LINKER_FLAGS_RELEASE: ${DEAL_II_SHARED_LINKER_FLAGS_RELEASE}\n")
+ _detailed("# DEAL_II_LINKER_FLAGS_RELEASE: ${DEAL_II_LINKER_FLAGS_RELEASE}\n")
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- _detailed("# DEAL_II_SHARED_LINKER_FLAGS_DEBUG: ${DEAL_II_SHARED_LINKER_FLAGS_DEBUG}\n")
+ _detailed("# DEAL_II_LINKER_FLAGS_DEBUG: ${DEAL_II_LINKER_FLAGS_DEBUG}\n")
ENDIF()
_detailed("#\n")
@@ -151,9 +183,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()
@@ -165,6 +195,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..60aad894df
--- /dev/null
+++ b/deal.II/cmake/setup_post_project_call.cmake
@@ -0,0 +1,58 @@
+## ---------------------------------------------------------------------
+## $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"
+ )
+ IF(DEAL_II_NATIVE MATCHES "-NOTFOUND")
+ MESSAGE(FATAL_ERROR
+ "Please set the CMake variable DEAL_II_NATIVE to a valid path that points to a native deal.II build directory"
+ )
+ ENDIF()
+ INCLUDE(${DEAL_II_NATIVE}/importExecutables.cmake)
+ENDIF()
diff --git a/deal.II/contrib/CMakeLists.txt b/deal.II/contrib/CMakeLists.txt
index c6569084fb..f507b519eb 100644
--- a/deal.II/contrib/CMakeLists.txt
+++ b/deal.II/contrib/CMakeLists.txt
@@ -1,22 +1,26 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
IF(DEAL_II_COMPONENT_MESH_CONVERTER)
ADD_SUBDIRECTORY(mesh_conversion)
ENDIF()
IF(DEAL_II_COMPONENT_PARAMETER_GUI)
- ADD_SUBDIRECTorY(parameter_gui)
+ ADD_SUBDIRECTORY(parameter_gui)
ENDIF()
+#ADD_SUBDIRECTORY(test_affinity)
+
diff --git a/deal.II/contrib/lapack_templates/example_custom_target.cmake b/deal.II/contrib/lapack_templates/example_custom_target.cmake
index fa77d9ed1b..108cad18f3 100644
--- a/deal.II/contrib/lapack_templates/example_custom_target.cmake
+++ b/deal.II/contrib/lapack_templates/example_custom_target.cmake
@@ -1,3 +1,19 @@
+## ---------------------------------------------------------------------
+## $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.
+##
+## ---------------------------------------------------------------------
+
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/deal.II/lac/lapack_templates.h
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/deal.II/lac/
diff --git a/deal.II/contrib/lapack_templates/lapack_templates.pl b/deal.II/contrib/lapack_templates/lapack_templates.pl
index cbad825c04..acfd48c119 100644
--- a/deal.II/contrib/lapack_templates/lapack_templates.pl
+++ b/deal.II/contrib/lapack_templates/lapack_templates.pl
@@ -1,15 +1,18 @@
-#---------------------------------------------------------------------------
-# $Id$
-# Version: $Name$
-#
-# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 by the deal authors
-#
-# This file is subject to QPL and may not be distributed
-# without copyright and license information. Please refer
-# to the file deal.II/doc/license.html for the text and
-# further information on this license.
-#
-#---------------------------------------------------------------------------
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2005 - 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 perl script translates lapack_templates.h.in to lapack_templates.h
@@ -37,19 +40,21 @@ my $double;
print << 'EOT'
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// This file was automatically generated from lapack_templates.h.in
-// See blastemplates in the deal.II contrib directory
+// Copyright (C) 2005 - 2013 by the deal.II authors
//
-// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 by the deal authors
+// This file is part of the deal.II library.
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
//
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
#ifndef __LAPACK_TEMPLATES_H
#define __LAPACK_TEMPLATES_H
diff --git a/deal.II/contrib/mesh_conversion/CMakeLists.txt b/deal.II/contrib/mesh_conversion/CMakeLists.txt
index c198104103..2c8dbc4c8f 100644
--- a/deal.II/contrib/mesh_conversion/CMakeLists.txt
+++ b/deal.II/contrib/mesh_conversion/CMakeLists.txt
@@ -1,18 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is multi licensed under
-## - QPL 1.0,
-## - GPL 2.0 or any later version,
-## - LGL 2.1 or any later version.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
#PROJECT(mesh_converter)
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/contrib/parameter_gui/CMakeLists.txt b/deal.II/contrib/parameter_gui/CMakeLists.txt
index 929bb5e2a1..542b9a5766 100644
--- a/deal.II/contrib/parameter_gui/CMakeLists.txt
+++ b/deal.II/contrib/parameter_gui/CMakeLists.txt
@@ -1,16 +1,18 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012, 2013 by the deal.II authors
+## Copyright (C) 2012 - 2013 by Martin Steigemann and Wolfgang Bangerth
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
#PROJECT(parameter_gui)
diff --git a/deal.II/contrib/parameter_gui/README b/deal.II/contrib/parameter_gui/README
index 43f041a2bd..963da457f9 100644
--- a/deal.II/contrib/parameter_gui/README
+++ b/deal.II/contrib/parameter_gui/README
@@ -1,4 +1,4 @@
-This subdirectory contains the parameterr_gui project.
+This subdirectory contains the parameter_gui project.
It is copyrighted by Martin Steigemann and Wolfgang Bangerth and
distributed under the same license as the deal.II library, i.e.
diff --git a/deal.II/contrib/parameter_gui/browse_lineedit.cpp b/deal.II/contrib/parameter_gui/browse_lineedit.cpp
index 33e89864c1..29d1db3ca0 100644
--- a/deal.II/contrib/parameter_gui/browse_lineedit.cpp
+++ b/deal.II/contrib/parameter_gui/browse_lineedit.cpp
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#include
diff --git a/deal.II/contrib/parameter_gui/browse_lineedit.h b/deal.II/contrib/parameter_gui/browse_lineedit.h
index 2c0a97fada..b03c7a6f8b 100644
--- a/deal.II/contrib/parameter_gui/browse_lineedit.h
+++ b/deal.II/contrib/parameter_gui/browse_lineedit.h
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#ifndef BROWSELINEEDIT_H
#define BROWSELINEEDIT_H
diff --git a/deal.II/contrib/parameter_gui/info_message.cpp b/deal.II/contrib/parameter_gui/info_message.cpp
index db753bc0b1..ca5614c5ce 100644
--- a/deal.II/contrib/parameter_gui/info_message.cpp
+++ b/deal.II/contrib/parameter_gui/info_message.cpp
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#include
diff --git a/deal.II/contrib/parameter_gui/info_message.h b/deal.II/contrib/parameter_gui/info_message.h
index f3ad3711e7..78969ef0c4 100644
--- a/deal.II/contrib/parameter_gui/info_message.h
+++ b/deal.II/contrib/parameter_gui/info_message.h
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#ifndef INFOMESSAGE_H
#define INFOMESSAGE_H
diff --git a/deal.II/contrib/parameter_gui/main.cpp b/deal.II/contrib/parameter_gui/main.cpp
index 461cd0c0aa..f7d1340482 100644
--- a/deal.II/contrib/parameter_gui/main.cpp
+++ b/deal.II/contrib/parameter_gui/main.cpp
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#include
#include
diff --git a/deal.II/contrib/parameter_gui/mainwindow.cpp b/deal.II/contrib/parameter_gui/mainwindow.cpp
index 4cef562f34..dbd2f430f0 100644
--- a/deal.II/contrib/parameter_gui/mainwindow.cpp
+++ b/deal.II/contrib/parameter_gui/mainwindow.cpp
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#include
diff --git a/deal.II/contrib/parameter_gui/mainwindow.h b/deal.II/contrib/parameter_gui/mainwindow.h
index 54deeae047..617c3e3422 100644
--- a/deal.II/contrib/parameter_gui/mainwindow.h
+++ b/deal.II/contrib/parameter_gui/mainwindow.h
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
diff --git a/deal.II/contrib/parameter_gui/parameter_delegate.cpp b/deal.II/contrib/parameter_gui/parameter_delegate.cpp
index ec7106f526..1dd33b59cc 100644
--- a/deal.II/contrib/parameter_gui/parameter_delegate.cpp
+++ b/deal.II/contrib/parameter_gui/parameter_delegate.cpp
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#include
@@ -96,7 +102,7 @@ namespace dealii
{
QString pattern_description = index.data(Qt::StatusTipRole).toString(); // load pattern description
// stored in the StatusLine
- QRegExp rx_string("\\b(Anything|MultipleSelection|List)\\b"),
+ QRegExp rx_string("\\b(Anything|MultipleSelection|List|Map)\\b"),
rx_filename("\\b(FileName)\\b"),
rx_dirname("\\b(DirectoryName)\\b"),
rx_integer("\\b(Integer)\\b"),
diff --git a/deal.II/contrib/parameter_gui/parameter_delegate.h b/deal.II/contrib/parameter_gui/parameter_delegate.h
index a4bcb2b98f..3c41359266 100644
--- a/deal.II/contrib/parameter_gui/parameter_delegate.h
+++ b/deal.II/contrib/parameter_gui/parameter_delegate.h
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#ifndef PARAMETERDELEGATE_H
#define PARAMETERDELEGATE_H
@@ -33,7 +39,7 @@ namespace dealii
* The ParameterDelegate class implements special delegates for the QTreeWidget class used in the parameterGUI.
* The QTreeWidget class provides some different standard delegates for editing parameters shown in the
* tree structure. The ParameterDelegate class provides special editors for the different types of parameters defined in
- * the ParameterHandler class. For all parameter types based on strings as "Anything", "MultipleSelection" and
+ * the ParameterHandler class. For all parameter types based on strings as "Anything", "MultipleSelection" "Map" and
* "List" a simple line editor will be shown up. In the case of integer and double type parameters the editor is a spin box and for
* "Selection" type parameters a combo box will be shown up. For parameters of type "FileName" and "DirectoryName"
* the delegate shows a @ref BrowseLineEdit editor. The column of the tree structure with the parameter values has to be set
diff --git a/deal.II/contrib/parameter_gui/xml_parameter_reader.cpp b/deal.II/contrib/parameter_gui/xml_parameter_reader.cpp
index 115da80d12..144dce7e6a 100644
--- a/deal.II/contrib/parameter_gui/xml_parameter_reader.cpp
+++ b/deal.II/contrib/parameter_gui/xml_parameter_reader.cpp
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#include
diff --git a/deal.II/contrib/parameter_gui/xml_parameter_reader.h b/deal.II/contrib/parameter_gui/xml_parameter_reader.h
index 6d90fd4d75..17d6f4a3d8 100644
--- a/deal.II/contrib/parameter_gui/xml_parameter_reader.h
+++ b/deal.II/contrib/parameter_gui/xml_parameter_reader.h
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#ifndef XMLPARAMETERREADER_H
#define XMLPARAMETERREADER_H
diff --git a/deal.II/contrib/parameter_gui/xml_parameter_writer.cpp b/deal.II/contrib/parameter_gui/xml_parameter_writer.cpp
index 553267d873..6bd10fce98 100644
--- a/deal.II/contrib/parameter_gui/xml_parameter_writer.cpp
+++ b/deal.II/contrib/parameter_gui/xml_parameter_writer.cpp
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#include
diff --git a/deal.II/contrib/parameter_gui/xml_parameter_writer.h b/deal.II/contrib/parameter_gui/xml_parameter_writer.h
index 814b486b82..f2597cd4ef 100644
--- a/deal.II/contrib/parameter_gui/xml_parameter_writer.h
+++ b/deal.II/contrib/parameter_gui/xml_parameter_writer.h
@@ -1,13 +1,19 @@
-//---------------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// $Id$
//
-// Copyright (C) 2010, 2011 by the deal.II authors
+// Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
//
-// This file is subject to QPL and may not be distributed
-// without copyright and license information. Please refer
-// to the file deal.II/doc/license.html for the text and
-// further information on this license.
+// 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.
+//
+// ---------------------------------------------------------------------
+
#ifndef XMLPARAMETERWRITER_H
#define XMLPARAMETERWRITER_H
diff --git a/deal.II/contrib/test_affinity/CMakeLists.txt b/deal.II/contrib/test_affinity/CMakeLists.txt
new file mode 100644
index 0000000000..83075153c0
--- /dev/null
+++ b/deal.II/contrib/test_affinity/CMakeLists.txt
@@ -0,0 +1,46 @@
+## ---------------------------------------------------------------------
+## $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.
+##
+## ---------------------------------------------------------------------
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+
+INCLUDE_DIRECTORIES(
+ BEFORE
+ ${CMAKE_SOURCE_DIR}/include/
+ ${CMAKE_BINARY_DIR}/include/
+ )
+
+ADD_EXECUTABLE(test_affinity
+ test_affinity.cc
+ )
+
+IF(CMAKE_BUILD_TYPE MATCHES "Debug")
+ SET(_build "DEBUG")
+ELSE()
+ SET(_build "RELEASE")
+ENDIF()
+
+SET_TARGET_PROPERTIES(test_affinity PROPERTIES
+ LINK_FLAGS "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}"
+ COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
+ COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${_build}}"
+ LINKER_LANGUAGE "CXX"
+ )
+
+TARGET_LINK_LIBRARIES(test_affinity ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX})
+
+IF(NOT CMAKE_CROSSCOMPILING)
+ ADD_CUSTOM_TARGET(run_test_affinity COMMAND test_affinity)
+ENDIF()
diff --git a/deal.II/contrib/test_affinity/test_affinity.cc b/deal.II/contrib/test_affinity/test_affinity.cc
new file mode 100644
index 0000000000..81549ae370
--- /dev/null
+++ b/deal.II/contrib/test_affinity/test_affinity.cc
@@ -0,0 +1,29 @@
+#include
+#include
+
+int main ()
+{
+ // we need this, otherwise gcc will not link against deal.II
+ dealii::Triangulation<2> test;
+
+ cpu_set_t my_set;
+ CPU_ZERO(&my_set);
+
+ unsigned int len = sizeof(my_set);
+ int ret = sched_getaffinity(0, len, &my_set);
+
+ if (ret!=0)
+ {
+ printf("sched_getaffinity() failed, return value: %d\n", ret);
+ return -1;
+ }
+
+ unsigned int bits_set = CPU_COUNT(&my_set);
+
+ if (bits_set==1)
+ {
+ printf("Warning: sched_getaffinity() returns that we can only use one CPU.\n");
+ return 1;
+ }
+ printf("ncpus=%d, mask=%08X\n", bits_set, *(unsigned int*)(&my_set));
+}
diff --git a/deal.II/doc/CMakeLists.txt b/deal.II/doc/CMakeLists.txt
index 6d9e9412de..8e63586481 100644
--- a/deal.II/doc/CMakeLists.txt
+++ b/deal.II/doc/CMakeLists.txt
@@ -1,23 +1,20 @@
-#####
+## ---------------------------------------------------------------------
+## $Id$
##
-## Copyright (C) 2012 by the deal.II authors
+## Copyright (C) 2012 - 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
-##
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
+## 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.
##
-## Author: Matthias Maier
-##
-#####
+## ---------------------------------------------------------------------
-#
-# Required packages for the document generation:
-#
-FIND_PACKAGE(Perl)
-FIND_PACKAGE(Doxygen)
#
@@ -25,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?
#
@@ -44,6 +47,11 @@ IF(DEAL_II_COMPONENT_DOCUMENTATION)
#
ADD_SUBDIRECTORY(doxygen)
+ #
+ # A custom target with the same name as the component:
+ #
+ ADD_CUSTOM_TARGET(documentation DEPENDS doxygen)
+
#
# Install the static elements of the html documentation:
#
diff --git a/deal.II/doc/authors.html b/deal.II/doc/authors.html
index 033fb196dc..36750b7b3b 100644
--- a/deal.II/doc/authors.html
+++ b/deal.II/doc/authors.html
@@ -12,7 +12,7 @@
- deal.II Credits
+ deal.II Authors
The deal.II project was initially started by
@@ -30,9 +30,9 @@
- Timo Heister,
- Texas A&M University, TX, USA
+ Clemson University, SC, USA
@@ -42,10 +42,6 @@
- In order to get in contact with them, send email to authors
- at dealii.org.
-
-
Many people have contributed to deal.II over the years, some of them very
substantial parts of the library. Their work
is greatly appreciated: no open source project can survice without a
@@ -59,7 +55,7 @@
Step-29 tutorial program.
Fahad Alrashed:
- work in PETScWrappers.
+ work in PETScWrappers, various other fixes.
Michael Anderson:
Linear complexity grid reordering algorithm in 2d and 3d.
@@ -94,6 +90,9 @@
Chih-Che Chueh:
Step-43 tutorial program.
+ Denis Davydov:
+ FEValuesExtractors::Tensor and associated functionality, various other changes.
+
Kevin Dugan:
Fixes in VectorTools::interpolate.
@@ -161,6 +160,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
@@ -185,7 +187,8 @@
2.5 format.
Matthias Maier:
- CMake build system. Periodic boundary conditions. Enhancements throughout the library.
+ CMake build system for the library and the testsuite. Periodic
+ boundary conditions. Enhancements throughout the library.
Cataldo Manigrasso:
Work on the codimension-one meshes, DoFHandler, and finite
@@ -260,7 +263,9 @@
Eulerian mappings.
Martin Steigemann:
- Graphical user interface for the ParameterHandler class. ParaSails preconditioner.
+ Graphical user interface for the ParameterHandler
+ class. ParaSails preconditioner. Functionality in various
+ places of the library.
Franz-Theo Suttmeier:
Initial parts of the linear algebra libraries.
@@ -272,11 +277,12 @@
Packaging and configuration issues.
Bruno Turcksin:
- Extending deal.ii for 64-bit integer support.
+ Extending deal.ii for 64-bit integer support. Converting the
+ testsuite to CMake. Various other changes.
Kainan Wang:
Extending deal.ii for 64-bit integer support.
-
+
Yaqi Wang:
The step-28 tutorial program;
@@ -288,6 +294,9 @@
Joshua White:
Arbitrary order Eulerian mappings.
+ Christian Wülker:
+ GridOut::write_svg.
+
Toby D. Young:
Interfaces to SLEPc; many changes in the interfaces to PETSc;
MUMPS interface;
@@ -317,18 +326,16 @@
Siegen, Germany.
-
+
+
+ The deal.II Authors
+ $Date$
+
diff --git a/deal.II/doc/development/Toolchain.sample b/deal.II/doc/developers/Toolchain.sample
similarity index 100%
rename from deal.II/doc/development/Toolchain.sample
rename to deal.II/doc/developers/Toolchain.sample
diff --git a/deal.II/doc/development/cmake-internals.html b/deal.II/doc/developers/cmake-internals.html
similarity index 57%
rename from deal.II/doc/development/cmake-internals.html
rename to deal.II/doc/developers/cmake-internals.html
index a21b8f0b79..b568a0527f 100644
--- a/deal.II/doc/development/cmake-internals.html
+++ b/deal.II/doc/developers/cmake-internals.html
@@ -11,158 +11,155 @@
-
-
-
- Build system internals
-
-
- 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.
-
-
-
-
- Table of contents |
-
-
- Configuration:
-
- Target definition and installation
-
- |
-
-
-
-
-
- Coding convention
-
- Coding conventions are always a matter of choice. Nevertheless, the
- following rules should be considered:
-
- -
- Statements and keywords are written in all caps.
-
-
- Indenting is done by two spaces; the usual indenting rules apply.
-
-
- The
ELSE()
, ENDIF()
,
- ENDFOREACH()
, etc. statements shall not repeat the
- corresponding condition in IF()
,
- FOREACH()
, etc.
- -
- To emphasize a comment it may be enclosed by a leading and
- trailing empty comment line.
-
- An example:
-
-
- FOREACH(_build ${DEAL_II_BUILD_TYPES})
- #
- # Set an appropriate keyword depending on target and build type:
- #
- IF(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease")
- SET(_keyword "general")
- ELSE()
- IF(_build MATCHES DEBUG)
- SET(_keyword "debug")
- ELSE()
- SET(_keyword "optimized")
- ENDIF()
- ENDIF()
- ENDFOREACH()
-
-
- -
- Line break is at 78 characters and should be obeyed whenever
- reasonable.
-
-
- Long statements should be broken into several lines at reasonable
- places. Additional lines for a statement are indented by 2
- spaces.
-
-
- Multiline statements must end with the closing bracket at a
- single line:
-
-
-
- LIST(APPEND CONFIG_LIBRARIES
- ${_keyword}
- ${CONFIG_LIBRARIES_${_build}}
- )
-
- SET_TARGET_PROPERTIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
- PROPERTIES
- VERSION ${VERSION}
- SOVERSION ${VERSION}
- LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_${build}}"
- COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${build}}"
- COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${build}}"
- )
-
- CMake operates almost always with variables in global state. To guard
- against accidential overwrite of variables the following naming
- conventions must be followed at all times:
-
- -
- Global (configuration) variables are written in all caps. When
- introducing a new one, ensure that the name isn't already used
- somewhere else. Unrelated global variables must never be
- overwritten.
-
-
- Global variables can be prefixed by
DEAL_II_
.
- (Global variables defined by CMake are usually prefixed by
- CMAKE_
.)
- -
- Local variables should always be named in all lowercase with a
- leading "_". Local variables cannot be assumed to remain valid.
- The may get overwritten at any time.
-
-
-
-
-
- ./CMakeLists.txt
and ./cmake/setup_*.cmake
-
-
- The very first configuration steps after some initial setup in
- ./CMakeLists.txt
takes place in some
- ./cmake/setup_*.cmake
files:
-
- -
setup_cached_variables.cmake
:
- This sets up all cached variables prior to the call to
- PROJECT(deal.II)
. For details see the comment at the
- top. Furthermore, some bookkeeping for compiler and linker flags
- takes place, see the section
- about compile flags.
- -
setup_deal_ii.cmake
:
- This file is included immediately after the call to
- PROJECT(deal.II)
and will set up all magic
- numbers such as names, definitions, relative and absolute
- paths used in the build system. Most of the definitions are
- guarded with the help of the SET_IF_EMPTY
macro so
- that it is possible to override the values from the command line.
- -
setup_compiler_flags.cmake
- sets up a suitable set of default compile flag for a known
- compiler by including the appropriate
- setup_compiler_flags_*.cmake
file. When adding new
- flags or compiler support, please respect the following note
-
+
+Build system internals
+
+
+ This page provides details about the CMake build system. Files
+ processed by the top level CMakeLists.txt
script are
+ listed in the TOC in chronological order.
+
+
+
+
+
+ Coding convention
+
+ Coding conventions are always a matter of choice. Nevertheless, the
+ following rules should be considered:
+
+ -
+ Statements and keywords are written in all caps.
+
-
+ Indenting is done by two spaces; the usual indenting rules apply.
+
-
+ The
ELSE()
, ENDIF()
,
+ ENDFOREACH()
, etc. statements shall not repeat the
+ corresponding condition in IF()
,
+ FOREACH()
, etc.
+ -
+ To emphasize a comment it may be enclosed by a leading and
+ trailing empty comment line.
+
+ An example:
+
+FOREACH(_build ${DEAL_II_BUILD_TYPES})
+#
+# Set an appropriate keyword depending on target and build type:
+#
+ IF(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease")
+ SET(_keyword "general")
+ ELSE()
+ IF(_build MATCHES DEBUG)
+ SET(_keyword "debug")
+ ELSE()
+ SET(_keyword "optimized")
+ ENDIF()
+ ENDIF()
+ENDFOREACH()
+
+
+
+ -
+ Line break is at 78 characters and should be obeyed whenever
+ reasonable.
+
-
+ Long statements should be broken into several lines at reasonable
+ places. Additional lines for a statement are indented by 2
+ spaces.
+
-
+ Multiline statements must end with the closing bracket at a
+ single line:
+
+
+LIST(APPEND CONFIG_LIBRARIES
+ ${_keyword}
+ ${CONFIG_LIBRARIES_${_build}}
+)
+
+SET_TARGET_PROPERTIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+ PROPERTIES
+ VERSION ${VERSION}
+ SOVERSION ${VERSION}
+ LINK_FLAGS "${DEAL_II_LINKER_FLAGS_${build}}"
+ COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${build}}"
+ COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${build}}"
+)
+
+
+
+ CMake operates almost always with variables in global state. To
+ guard against accidental overwrite of variables the following naming
+ conventions must be followed at all times:
+
+
+
+ -
+ Global (configuration) variables are written in all caps. When
+ introducing a new one, ensure that the name isn't already used
+ somewhere else. Unrelated global variables must never be
+ overwritten.
+
-
+ Global variables can be prefixed by
DEAL_II_
.
+ (Global variables defined by CMake are usually prefixed by
+ CMAKE_
.)
+ -
+ Local variables should always be named in all lowercase with a
+ leading "_". Local variables cannot be assumed to remain valid.
+ The may get overwritten at any time.
+
+
+
+Configuration
+
+
+ ./CMakeLists.txt
and ./cmake/setup_*.cmake
+
+
+ The very first configuration steps after some initial setup in
+ ./CMakeLists.txt
takes place in some
+ ./cmake/setup_*.cmake
files:
+
+ -
setup_cached_variables.cmake
:
+ This sets up all cached variables prior to the call to
+ PROJECT(deal.II)
. For details see the comment at the
+ top. Furthermore, some bookkeeping for compiler and linker flags
+ takes place, see the section
+ about compile flags.
+ -
setup_deal_ii.cmake
:
+ This file is included immediately after the call to
+ PROJECT(deal.II)
and will set up all magic
+ numbers such as names, definitions, relative and absolute
+ paths used in the build system. Most of the definitions are
+ guarded with the help of the SET_IF_EMPTY
macro so
+ that it is possible to override the values from the command line.
+ -
setup_compiler_flags.cmake
+ sets up a suitable set of default compile flag for a known
+ compiler by including the appropriate
+ setup_compiler_flags_*.cmake
file. When adding new
+ flags or compiler support, please respect the following note
+
+
#
# (./cmake/setup_compiler_flags.cmake)
@@ -177,15 +174,15 @@
# CMAKE_CXX_FLAGS
# DEAL_II_CXX_FLAGS_DEBUG
# DEAL_II_CXX_FLAGS_RELEASE
- # CMAKE_SHARED_LINKER_FLAGS
- # DEAL_II_SHARED_LINKER_FLAGS_DEBUG
- # DEAL_II_SHARED_LINKER_FLAGS_RELEASE
+ # DEAL_II_LINKER_FLAGS
+ # DEAL_II_LINKER_FLAGS_DEBUG
+ # DEAL_II_LINKER_FLAGS_RELEASE
#
# All modifications shall be guarded with the ENABLE_IF_SUPPORTED
# or ENABLE_IF_LINKS macro, e.g.
#
# ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic")
- # ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+ # ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
#
# Compiler flags for platform dependent optimization (such as
# -march=native) must always be guarded with
@@ -209,20 +206,21 @@
# ./cmake/checks/check_01_system_features.cmake
# ./cmake/checks/check_02_compiler_bugs.cmake
#
-
-
-
+
+
+
-
- ./cmake/checks/check_*.cmake
+
+ ./cmake/checks/check_*.cmake
-
- The next step in the configuration process is to include all
- checks residing under ./cmake/checks
. Currently
- there are:
-
+
+ The next step in the configuration process is to include all
+ checks residing under ./cmake/checks
. Currently
+ there are:
+
+
./cmake/checks/check_01_compiler_features.cmake
- Search for support for compiler dependent features such as stack
trace support, demangler support, etc.
@@ -241,31 +239,34 @@
./cmake/checks/check_02_compiler_bugs.cmake
- Check for compiler bugs
-
-
- -
- A check usually consists of a call to one of the macros below
- that will set up a global variable. Please stick to the naming
- convention
HAVE_<..>
, resp.
- DEAL_II_(HAVE|USE)_<..>
. It is forbidden to
- use a variable name starting with
- DEAL_II_WITH_<..>
because this prefix is
- exclusively reserved for the feature mechanism described
- below. For some tests it might be necessary to manipulate global variables.
- -
- A platform check should have a prominent comment explaining what
- it does and why it is there, and should state author and year.
-
-
- There are a number of readily available platform check macros:
-
+
+
+
+
+ -
+ A check usually consists of a call to one of the macros below
+ that will set up a global variable. Please stick to the naming
+ convention
HAVE_<..>
, resp.
+ DEAL_II_(HAVE|USE)_<..>
. It is forbidden to
+ use a variable name starting with
+ DEAL_II_WITH_<..>
because this prefix is
+ exclusively reserved for the feature mechanism described
+ below. For some tests it might be necessary to manipulate
+ global variables.
+ -
+ A platform check should have a prominent comment explaining what
+ it does and why it is there, and should state author and year.
+
-
+ There are a number of readily available platform check macros:
+
+
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
@@ -292,62 +293,67 @@
CHECK_CXX_COMPILER_FLAG(flag variable)
- Sets the variable to 1 if the compiler understands the flag.
-
- - Necessary compiler flags can easily set in the string variable
-
CMAKE_REQUIRED_FLAGS
. There are two small macros
- that do this job nicely:
-
+
+
+ - Necessary compiler flags can easily set in the string variable
+
CMAKE_REQUIRED_FLAGS
. There are two small macros
+ that do this job nicely:
+
+
PUSH_TEST_FLAG("-Werror")
CHECK_CXX_SOURCE_COMPILES(...)
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:
-
-
- SET(CMAKE_REQUIRED_LIBRARIES <a list of libraries>
+
+
+ - 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:
+
+
+
+ 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)
-
-
-
-
-
-
-
- ./cmake/modules/Find*.cmake
-
-
- These are find modules for the configure_*.cmake
files
- and the CONFIGURE_FEATURE
macro as will explained later.
- It is crucial that a find module behaves correctly. Therefore, the
- following rules are mandatory:
-
+
+
+
+ ./cmake/modules/Find*.cmake
+
+
+ These are find modules for the configure_*.cmake
files
+ and the CONFIGURE_FEATURE
macro as will explained later.
+ It is crucial that a find module behaves correctly. Therefore, the
+ following rules are mandatory:
+
+ -
+ The sole purpose of a find module is to find an external
+ library (no deal.II specific dependency checking, no
+ compatibility checking).
+
-
+ It should do so by appropriate
FIND_LIBRARY
and
+ FIND_PATH
calls. The results of this calls should be the
+ only cached variables.
+ -
+
FIND_PACKAGE_HANDLE_STANDARD_ARGS
should be used for
+ setting FEATURE_FOUND
as this already respects the
+ QUIET
and REQUIRED
keywords.
+ -
+ A
WARNING
, SEND_ERROR
or
+ FATAL_ERROR
must be avoided (the only exception is
+ the REQUIRED
keyword).
+ -
+ If successful, the following uncached variables might be set:
+
+
+
FEATURE_FOUND
FEATURE_LIBRARIES
FEATURE_INCLUDE_DIRS
@@ -357,41 +363,43 @@
FEATURE_VERSION_MAJOR
FEATURE_VERSION_MINOR
FEATURE_VERSION_SUBMINOR
-
- There are obviously valid exceptions from this rule, though.
- -
- Only "local" variables "
_<all lowercase>
" or
- "global" variables prefixed by FEATURE_
may be
- altered. Do not set DEAL_II_*
or CMAKE_*
- variables directly!
- -
- A hint with
FEATURE_DIR
can be set up for
- convenience. It is best to start the Find
module by
-
-
- SET_IF_EMPTY(FEATURE_DIR "$ENV{FEATURE_DIR}")
-
- and use FEATURE_DIR
as a hint. If the external
- library could be found, hide it via
- MARK_AS_ADVANCED
, if the external library could not
- be found, set a cache value:
-
-
- SET(FEATURE_DIR "" CACHE PATH "An optional hint to a FEATURE directory")
-
-
+
+There are obviously valid exceptions from this rule, though.
+ -
+ Only "local" variables "
_<all lowercase>
" or
+ "global" variables prefixed by FEATURE_
may be
+ altered. Do not set DEAL_II_*
or CMAKE_*
+ variables directly!
+ -
+ A hint with
FEATURE_DIR
can be set up for
+ convenience. It is best to start the Find
module by
+
-
- ./cmake/configure/configure_*.cmake
+ SET_IF_EMPTY(FEATURE_DIR "$ENV{FEATURE_DIR}")
+
+
+and use FEATURE_DIR
as a hint. If the external
+library could be found, hide it via
+MARK_AS_ADVANCED
, if the external library could not
+be found, set a cache value:
+
+
+ SET(FEATURE_DIR "" CACHE PATH "An optional hint to a FEATURE directory")
+
+
-
- The final step in the configuration phase is the setup of features
- (which refer to external or bundled libraries
- deal.II can optionally interface with.)
-
+
+ ./cmake/configure/configure_*.cmake
+
+
+ The final step in the configuration phase is the setup of features
+ (which refer to external or bundled libraries
+ deal.II can optionally interface with.)
+
+
At bare minimum configure_<feature>.cmake
@@ -430,7 +438,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_[...]
@@ -513,9 +521,9 @@
For internal use, for setting necessary linker flags for the deal.II library:
- -
CMAKE_SHARED_LINKER_FLAGS
- -
DEAL_II_SHARED_LINKER_FLAGS_DEBUG
- -
DEAL_II_SHARED_LINKER_FLAGS_RELEASE
+ -
DEAL_II_LINKER_FLAGS
+ -
DEAL_II_LINKER_FLAGS_DEBUG
+ -
DEAL_II_LINKER_FLAGS_RELEASE
@@ -572,7 +580,8 @@
-
+
+ Target definition and installation
./include/deal.II/base/config.h.in
@@ -601,10 +610,21 @@
two macros:
+ #
+ # 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
+ # trade-off to have to run "make rebuild_cache" when a new header file
+ # emerges...)
+ #
+ FILE(GLOB _header
+ ${CMAKE_SOURCE_DIR}/include/deal.II/dofs/*.h
+ )
+
#
# A list of source files forming the object target:
#
- SET(src
+ SET(_src
...
dof_tools.cc
)
@@ -612,7 +632,7 @@
#
# A list of instantiations that must be expanded:
#
- SET(inst_in_files
+ SET(_inst
...
dof_tools.inst.in
)
@@ -625,7 +645,10 @@
# ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_objects_(debug/release)
# so that it is available in global scope.
#
- DEAL_II_ADD_LIBRARY(obj_dofs OBJECT ${src})
+ # Header files and instatiation files (${_header}, ${_inst}) are added
+ # for cosmetic reasons, so that they show up in IDEs.
+ #
+ DEAL_II_ADD_LIBRARY(obj_dofs OBJECT ${_src} ${_header} ${_inst})
#
# This macro will set up an obj_dofs.inst target for expanding all
@@ -656,11 +679,17 @@
resides under ./cmake/config/template_arguments.in
.
-
-
+
- The deal.II Group
+ The deal.II Authors
$Date$
+
+
diff --git a/deal.II/doc/development/indentation.html b/deal.II/doc/developers/indentation.html
similarity index 73%
rename from deal.II/doc/development/indentation.html
rename to deal.II/doc/developers/indentation.html
index 136881c130..1341960ff3 100644
--- a/deal.II/doc/development/indentation.html
+++ b/deal.II/doc/developers/indentation.html
@@ -38,5 +38,18 @@
!! file style mismatch detected
please re-indent the file. SVN may reject those files soon!
+
+
+
+ The deal.II Authors
+ $Date$
+
+
+