]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
A bunch of checks
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 11 Sep 2012 09:32:13 +0000 (09:32 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 11 Sep 2012 09:32:13 +0000 (09:32 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26276 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/aclocal.m4
deal.II/contrib/cmake/modules/configure_threads.cmake
deal.II/contrib/cmake/tests/check_for_cxx_features.cmake
deal.II/include/deal.II/base/config.h.in
deal.II/include/deal.II/base/config.h.in.old

index aa985c72caa33e84103fed538efb19dd2527a4f5..5c3c0e14c1908cacc56b269d4f25d6efa65ed7f9 100644 (file)
@@ -2,13 +2,6 @@ PROJECT(deal.II)
 
 SET(VERSION "8.0.pre")
 
-SET(DEAL_II_PACKAGE_BUGREPORT "dealii@dealii.org")
-SET(DEAL_II_PACKAGE_NAME "deal.II")
-SET(DEAL_II_PACKAGE_TARNAME ${DEAL_II_PACKAGE_NAME})
-SET(DEAL_II_PACKAGE_VERSION ${VERSION})
-SET(DEAL_II_PACKAGE_STRING "${DEAL_II_PACKAGE_NAME} ${DEAL_II_PACKAGE_VERSION}")
-SET(DEAL_II_PACKAGE_URL "")
-
 
 
 
@@ -29,6 +22,22 @@ SET(CMAKE_MODULE_PATH
 
 
 
+#
+# Set up deal.II specific variables
+#
+
+SET(DEAL_II_PACKAGE_BUGREPORT "dealii@dealii.org")
+SET(DEAL_II_PACKAGE_NAME "deal.II")
+SET(DEAL_II_PACKAGE_TARNAME ${DEAL_II_PACKAGE_NAME})
+SET(DEAL_II_PACKAGE_VERSION ${VERSION})
+SET(DEAL_II_PACKAGE_STRING "${DEAL_II_PACKAGE_NAME} ${DEAL_II_PACKAGE_VERSION}")
+SET(DEAL_II_PACKAGE_URL "")
+STRING(REGEX REPLACE "^([0-9]+)\\..*" "\\1" DEAL_II_MAJOR "${VERSION}")
+STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" DEAL_II_MINOR "${VERSION}")
+SET(DEAL_II_PATH ${CMAKE_INSTALL_PREFIX})
+
+
+
 
 #
 # General configuration options:
@@ -82,7 +91,7 @@ OPTION(DEAL_II_FORCE_CONTRIB_UMFPACK
 
 
 #
-# Now, configure and configure a lot of things:
+# Now, configure a lot of things:
 #
 
 # used as a dummy target for all the stuff that has to be done before the
index 61bf7ecf1b9f3e245805965a93712b983d6c73ec..0d3bcdcc021e107adf0cd36cfe6458162eeea546 100644 (file)
@@ -5154,130 +5154,6 @@ int main () {
 
 
 
-dnl -------------------------------------------------------------
-dnl Check whether the numeric_limits classes are available
-dnl
-dnl Usage: DEAL_II_HAVE_STD_NUMERIC_LIMITS
-dnl
-dnl -------------------------------------------------------------
-AC_DEFUN(DEAL_II_HAVE_STD_NUMERIC_LIMITS, dnl
-[
-  AC_MSG_CHECKING(for std::numeric_limits classes)
-  AC_LANG(C++)
-  CXXFLAGS="$CXXFLAGSG"
-  AC_TRY_COMPILE(
-    [
-#include <limits>
-    ],
-    [
-        return std::numeric_limits<unsigned int>::min();
-    ],
-    [
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(HAVE_STD_NUMERIC_LIMITS, 1,
-                [Define if the compiler's library in use provides
-                 std::numeric_limits classes in the appropriate header file])
-    ],
-    [
-      AC_MSG_RESULT(no)
-    ])
-])
-
-
-
-dnl -------------------------------------------------------------
-dnl Check whether the numeric_limits classes are available
-dnl
-dnl Usage: DEAL_II_HAVE_STD_OSTREAM_HEADER
-dnl
-dnl -------------------------------------------------------------
-AC_DEFUN(DEAL_II_HAVE_STD_OSTREAM_HEADER, dnl
-[
-  AC_MSG_CHECKING(for <ostream> header)
-  AC_LANG(C++)
-  CXXFLAGS="$CXXFLAGSG"
-  AC_TRY_COMPILE(
-    [
-#include <ostream>
-void f (const std::ostream &out);
-    ],
-    [
-    ],
-    [
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(HAVE_STD_OSTREAM_HEADER, 1,
-                [Define if the compiler provides an <ostream> header file])
-    ],
-    [
-      AC_MSG_RESULT(no)
-    ])
-])
-
-
-
-dnl -------------------------------------------------------------
-dnl Check whether the <iosfwd> header is available
-dnl
-dnl Usage: DEAL_II_HAVE_STD_OSTREAM_HEADER
-dnl
-dnl -------------------------------------------------------------
-AC_DEFUN(DEAL_II_HAVE_STD_IOSFWD_HEADER, dnl
-[
-  AC_MSG_CHECKING(for <iosfwd> header)
-  AC_LANG(C++)
-  CXXFLAGS="$CXXFLAGSG"
-  AC_TRY_COMPILE(
-    [
-#include <iosfwd>
-void f (const std::ostream &out);
-    ],
-    [
-    ],
-    [
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(HAVE_STD_IOSFWD_HEADER, 1,
-                [Define if the compiler provides an <iosfwd> header file])
-    ],
-    [
-      AC_MSG_RESULT(no)
-    ])
-])
-
-
-
-dnl -------------------------------------------------------------
-dnl Check whether the std::vector::iterator is just a plain pointer
-dnl
-dnl Usage: DEAL_II_CHECK_VECTOR_ITERATOR_IS_POINTER
-dnl
-dnl -------------------------------------------------------------
-AC_DEFUN(DEAL_II_CHECK_VECTOR_ITERATOR_IS_POINTER, dnl
-[
-  AC_MSG_CHECKING(whether vector iterators are plain pointers)
-  AC_LANG(C++)
-  CXXFLAGS="$CXXFLAGSG"
-  AC_TRY_COMPILE(
-    [
-#include <vector>
-template <typename T> void f(T) {}
-
-template void f(int *);
-template void f(std::vector<int>::iterator);
-    ],
-    [
-    ],
-    [
-      AC_MSG_RESULT(no)
-    ],
-    [
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(DEAL_II_VECTOR_ITERATOR_IS_POINTER, 1,
-                [Define if vector iterators are just plain pointers])
-    ])
-])
-
-
-
 dnl -------------------------------------------------------------
 dnl Check whether glibc-like stacktrace information is available
 dnl for the Exception class. If it is, then try to also determine
index 6780635c1b8ac286fb2d7b04ba89be744732a6c4..14e06f5f3d82c897d3639c135fc330338479830d 100644 (file)
@@ -1,5 +1,8 @@
 FIND_PACKAGE(Threads REQUIRED)
 
+# TODO: Necessary link commands for threads? Or are they set automatically
+# by the package?
+
 IF(DEAL_II_ALLOW_CONTRIB)
   FIND_PACKAGE(TBB)
 ELSE()
index 36af404f74d80eb69fa1f15b2916994b4a036387..8aa63402c802c665db3ca597af13b22320d79b5a 100644 (file)
@@ -1,4 +1,5 @@
 INCLUDE(CheckCXXSourceCompiles)
+INCLUDE(CheckIncludeFiles)
 
 #
 # Check for various CXX Features.
@@ -6,7 +7,6 @@ INCLUDE(CheckCXXSourceCompiles)
 
 
 
-
 #
 # gcc2.95 doesn't have the std::iterator class, but the standard
 # requires it, so check whether we have to work around it
@@ -33,3 +33,52 @@ CHECK_CXX_SOURCE_COMPILES(
   int main(){return 0;}
   "
   HAVE_STD_STRINGSTREAM)
+
+
+#
+# Check whether the numeric_limits classes are available
+#
+CHECK_CXX_SOURCE_COMPILES(
+  "
+  #include <limits>
+  unsigned int i = std::numeric_limits<unsigned int>::min();
+  int main(){return 0;}
+  "
+  HAVE_STD_NUMERIC_LIMITS)
+
+
+#
+# Check whether the std::vector::iterator is just a plain pointer
+#
+CHECK_CXX_SOURCE_COMPILES(
+  "
+  #include <vector>
+  template <typename T> void f(T) {}
+  template void f(int *);
+  template void f(std::vector<int>::iterator);
+  int main(){return 0;}
+  "
+  DEAL_II_VECTOR_ITERATOR_IS_NOT_POINTER)
+
+IF(NOT DEAL_II_VECTOR_ITERATOR_IS_NOT_POINTER)
+  SET(DEAL_II_VECTOR_ITERATOR_IS_POINTER 1)
+ENDIF()
+
+
+#
+# Checks for various header files:
+#
+
+CHECK_INCLUDE_FILES("ostream" HAVE_STD_OSTREAM_HEADER)
+CHECK_INCLUDE_FILES("iosfwd" HAVE_STD_IOSFWD_HEADER)
+CHECK_INCLUDE_FILES("stdint.h" HAVE_STDINT_H)
+CHECK_INCLUDE_FILES("stdlib.h" HAVE_STDLIB_H)
+CHECK_INCLUDE_FILES("strings.h" HAVE_STRINGS_H)
+CHECK_INCLUDE_FILES("string.h" HAVE_STRING_H)
+CHECK_INCLUDE_FILES("sys/stat.h" HAVE_SYS_STAT_H)
+CHECK_INCLUDE_FILES("sys/syscall.h" HAVE_SYS_SYSCALL_H)
+CHECK_INCLUDE_FILES("sys/times.h" HAVE_SYS_TIMES_H)
+CHECK_INCLUDE_FILES("sys/types.h" HAVE_SYS_TYPES_H)
+
+
+# /* Defined to 1 if you have the `strtrs_' function. */HAVE_STRTRS_ 1
index 32f04518f5a1b24652910a3ca3e01d319c2e631f..1a66ce99237724fe559c0fcc17a85359fd992a60 100644 (file)
@@ -15,7 +15,6 @@
 #define __deal2__config_h
 
 
-
 /**
  * Two macro names that we put at the top and bottom of all deal.II files
  * and that will be expanded to "namespace dealii {" and "}".
 #define DEAL_II_NAMESPACE_CLOSE }
 
 /* Define to the full name of this package. */
-#cmakedefine DEAL_II_PACKAGE_NAME "@DEAL_II_PACKAGE_NAME@"
+#define DEAL_II_PACKAGE_NAME "@DEAL_II_PACKAGE_NAME@"
 
 /* Define to the one symbol short name of this package. */
-#cmakedefine DEAL_II_PACKAGE_TARNAME "@DEAL_II_PACKAGE_TARNAME@"
+#define DEAL_II_PACKAGE_TARNAME "@DEAL_II_PACKAGE_TARNAME@"
 
 /* Define to the version of this package. */
-#cmakedefine DEAL_II_PACKAGE_VERSION "@DEAL_II_PACKAGE_VERSION@"
+#define DEAL_II_PACKAGE_VERSION "@DEAL_II_PACKAGE_VERSION@"
 
 /* Define to the full name and version of this package. */
-#cmakedefine DEAL_II_PACKAGE_STRING "@DEAL_II_PACKAGE_STRING@"
+#define DEAL_II_PACKAGE_STRING "@DEAL_II_PACKAGE_STRING@"
 
 /* Define to the address where bug reports for this package should be sent. */
-#cmakedefine DEAL_II_PACKAGE_BUGREPORT "@DEAL_II_PACKAGE_BUGREPORT@"
+#define DEAL_II_PACKAGE_BUGREPORT "@DEAL_II_PACKAGE_BUGREPORT@"
 
 /* Define to the home page for this package. */
-#cmakedefine DEAL_II_PACKAGE_URL "@DEAL_II_PACKAGE_URL@"
+#define DEAL_II_PACKAGE_URL "@DEAL_II_PACKAGE_URL@"
+
+/* Path to the deal.II directory */
+#define DEAL_II_PATH "@DEAL_II_PATH@"
+
+/* Major version number of deal.II */
+#define DEAL_II_MAJOR "@DEAL_II_MAJOR@"
+
+/* Minor version number of deal.II */
+#define DEAL_II_MINOR "@DEAL_II_MINOR@"
 
 
 
    classes (early gcc versions did not) */
 #cmakedefine HAVE_STD_STRINGSTREAM 1
 
+/* Defined if the compiler's library in use provides std::numeric_limits
+   classes in the appropriate header file */
+#cmakedefine HAVE_STD_NUMERIC_LIMITS 1
+
+/* Defined if vector iterators are just plain pointers */
+#cmakedefine DEAL_II_VECTOR_ITERATOR_IS_POINTER 1
+
+/* Defined if the compiler provides an <ostream> header file */
+#cmakedefine HAVE_STD_OSTREAM_HEADER 1
+
+/* Defined if the compiler provides an <iosfwd> header file */
+#cmakedefine HAVE_STD_IOSFWD_HEADER 1
+
+/* Defined to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H 1
+
+/* Defined to 1 if you have the <stdlib.h> header file. */
+#cmakedefine HAVE_STDLIB_H 1
+
+/* Defined to 1 if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H 1
+
+/* Defined to 1 if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H 1
+
+/* Defined to 1 if you have the <sys/stat.h> header file. */
+#cmakedefine HAVE_SYS_STAT_H 1
+
+/* Defined to 1 if you have the <sys/syscall.h> header file. */
+#cmakedefine HAVE_SYS_SYSCALL_H 1
+
+/* Defined to 1 if you have the <sys/times.h> header file. */
+#cmakedefine HAVE_SYS_TIMES_H 1
+
+/* Defined to 1 if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H 1
+
+/* Defined to 1 if you have the `strtrs_' function. */
+#cmakedefine HAVE_STRTRS_ 1
+
+
 
 
 
index 3ffbd67fbcf9f60fd016a34fa2f9a769a40f910f..b393933e8280f1893ae0e798b136e9a955052f0d 100644 (file)
    the top-level directory. */
 #cmakedefine DEAL_II_LONG_DOUBLE_LOOP_BUG
 
-/* Major version number of deal.II */
-#cmakedefine DEAL_II_MAJOR
-
 /* Defined if the compiler refuses to allow the explicit specialization of
    static member arrays. For the exact failure mode, look at aclocal.m4 in the
    top-level directory. */
    the top-level directory. */
 #cmakedefine DEAL_II_MEMBER_VAR_SPECIALIZATION_BUG
 
-/* Minor version number of deal.II */
-#cmakedefine DEAL_II_MINOR
-
 /* Set to the minimal number of elements a std::vector<bool> can always hold,
    i.e. its minimal capacity. */
 #cmakedefine DEAL_II_MIN_BOOL_VECTOR_CAPACITY
    member classes when giving a full class specification. */
 #cmakedefine DEAL_II_NESTED_CLASS_TEMPL_FRIEND_BUG
 
-/* Path to the deal.II directory */
-#cmakedefine DEAL_II_PATH
-
 /* Defined if the compiler does not support the
    substitution-failure-is-not-an-error paradigm. For the details, look at
    aclocal.m4 in the top-level directory. */
 /* Defined if a Trilinos installation was found and is going to be used */
 #cmakedefine DEAL_II_USE_TRILINOS
 
-/* Define if vector iterators are just plain pointers */
-#cmakedefine DEAL_II_VECTOR_ITERATOR_IS_POINTER
-
 /* This error appears in the Apple edition of the gcc 3.3, which ships with
    Darwin7.9.0 and probably previous version. It leads to problems during
    linking. For the details, look at aclocal.m4 in the top-level directory. */
 /* Define to 1 if you have the `ssygv_' function. */
 #cmakedefine HAVE_SSYGV_
 
-/* Define to 1 if you have the <stdint.h> header file. */
-#cmakedefine HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#cmakedefine HAVE_STDLIB_H
-
-/* Define if the compiler provides an <iosfwd> header file */
-#cmakedefine HAVE_STD_IOSFWD_HEADER
-
-/* Define if the compiler's library in use provides std::numeric_limits
-   classes in the appropriate header file */
-#cmakedefine HAVE_STD_NUMERIC_LIMITS
-
-/* Define if the compiler provides an <ostream> header file */
-#cmakedefine HAVE_STD_OSTREAM_HEADER
-
-/* Define to 1 if you have the <strings.h> header file. */
-#cmakedefine HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#cmakedefine HAVE_STRING_H
-
-/* Define to 1 if you have the `strtrs_' function. */
-#cmakedefine HAVE_STRTRS_
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#cmakedefine HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/syscall.h> header file. */
-#cmakedefine HAVE_SYS_SYSCALL_H
-
-/* Define to 1 if you have the <sys/times.h> header file. */
-#cmakedefine HAVE_SYS_TIMES_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#cmakedefine HAVE_SYS_TYPES_H
-
 /* Define to 1 if you have the <Teuchos_ParameterList.hpp> header file. */
 #cmakedefine HAVE_TEUCHOS_PARAMETERLIST_HPP
 

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

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.