From: maier Date: Fri, 28 Sep 2012 14:09:25 +0000 (+0000) Subject: Reorganization of langauge and system checks X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e7b019258e928035652ee6d525786949fc041eb;p=dealii-svn.git Reorganization of langauge and system checks git-svn-id: https://svn.dealii.org/branches/branch_cmake@26836 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/checks/check_for_cxx_features.cmake b/deal.II/cmake/checks/check_for_cxx_features.cmake index 86d42a0931..8b242b3269 100644 --- a/deal.II/cmake/checks/check_for_cxx_features.cmake +++ b/deal.II/cmake/checks/check_for_cxx_features.cmake @@ -3,14 +3,6 @@ # -CHECK_CXX_SOURCE_COMPILES( - " - #include - int main(){return 0;} - " - HAVE_STD_IOSFWD_HEADER) - - # # C++11 Support: # @@ -213,6 +205,7 @@ CHECK_CXX_SOURCE_COMPILES( " HAVE_ISNAN) + CHECK_CXX_SOURCE_COMPILES( " #include @@ -220,6 +213,7 @@ CHECK_CXX_SOURCE_COMPILES( " HAVE_UNDERSCORE_ISNAN) + CHECK_CXX_SOURCE_COMPILES( " #include @@ -234,11 +228,9 @@ CHECK_CXX_SOURCE_COMPILES( # CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H) + CHECK_INCLUDE_FILE("stdlib.h" HAVE_STDLIB_H) + CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H) + CHECK_INCLUDE_FILE("strings.h" HAVE_STRINGS_H) -CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H) -CHECK_INCLUDE_FILE("sys/syscall.h" HAVE_SYS_SYSCALL_H) -CHECK_INCLUDE_FILE("sys/times.h" HAVE_SYS_TIMES_H) -CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H) -CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H) diff --git a/deal.II/cmake/checks/check_for_system_features.cmake b/deal.II/cmake/checks/check_for_system_features.cmake new file mode 100644 index 0000000000..46b5fa9d63 --- /dev/null +++ b/deal.II/cmake/checks/check_for_system_features.cmake @@ -0,0 +1,14 @@ +# +# Check for various system features: +# + + +CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H) + +CHECK_INCLUDE_FILE("sys/syscall.h" HAVE_SYS_SYSCALL_H) + +CHECK_INCLUDE_FILE("sys/times.h" HAVE_SYS_TIMES_H) + +CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H) + +CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H) diff --git a/deal.II/include/deal.II/base/config.h.in b/deal.II/include/deal.II/base/config.h.in index e9aa873828..3b0af02f50 100644 --- a/deal.II/include/deal.II/base/config.h.in +++ b/deal.II/include/deal.II/base/config.h.in @@ -19,6 +19,7 @@ #define DEAL_II_NAMESPACE_OPEN namespace dealii { #define DEAL_II_NAMESPACE_CLOSE } + /* Define to the full name of this package. */ #define DEAL_II_PACKAGE_NAME "@DEAL_II_PACKAGE_NAME@" @@ -311,8 +312,6 @@ #cmakedefine HAVE_LIBZ - - /********************************************** * Configured in check_for_compiler_features: * **********************************************/ @@ -362,7 +361,11 @@ */ #define DEAL_II_MIN_BOOL_VECTOR_CAPACITY @DEAL_II_MIN_BOOL_VECTOR_CAPACITY@ - +/* If the compiler supports it, then this variable is defined to a string + * that when written after a function name makes the compiler emit a warning + * whenever this function is used somewhere that its use is deprecated. + */ +#cmakedefine DEAL_II_DEPRECATED @DEAL_II_DEPRECATED@ /****************************************** @@ -376,8 +379,6 @@ #cmakedefine DEAL_II_EXPLICIT_DESTRUCTOR_BUG - - /***************************************** * Configured in check_for_cxx_features: * *****************************************/ @@ -409,6 +410,15 @@ /* Defined if you have the header file. */ #cmakedefine HAVE_STRING_H + +/******************************************** + * Configured in check_for_system_features: * + ********************************************/ + + +/* Defined if you have the header file. */ +#cmakedefine HAVE_UNISTD_H + /* Defined if you have the header file. */ #cmakedefine HAVE_SYS_STAT_H @@ -421,13 +431,38 @@ /* Defined if you have the header file. */ #cmakedefine HAVE_SYS_TYPES_H -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H +/* Defined if you have the "gethostname" function. */ +#cmakedefine HAVE_GETHOSTNAME + +/* Defined if you have the "getpid' function. */ +#cmakedefine HAVE_GETPID + +/* Defined if you have the "rand_r" function */ +#cmakedefine HAVE_RAND_R + +/* Defined if you have the "times" function. */ +#cmakedefine HAVE_TIMES + +/* Defined if you have the "jn" function. */ +#cmakedefine HAVE_JN + +/* Defined if the system stores words with the most significant byte first */ +#cmakedefine DEAL_II_WORDS_BIGENDIAN + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + + -/* If the compiler supports it, then this variable is defined to a string - that when written after a function name makes the compiler emit a warning - whenever this function is used somewhere that its use is deprecated. */ -#cmakedefine DEAL_II_DEPRECATED @DEAL_II_DEPRECATED@ diff --git a/deal.II/include/deal.II/base/config.h.in.old b/deal.II/include/deal.II/base/config.h.in.old index 221195a5dc..45e0467129 100644 --- a/deal.II/include/deal.II/base/config.h.in.old +++ b/deal.II/include/deal.II/base/config.h.in.old @@ -3,36 +3,6 @@ TODO: /* enable multigrid compatibility mode */ #cmakedefine DEAL_II_MULTIGRID_COMPATIBILITY -/* Defined if the system stores words with the most significant byte first */ -#cmakedefine DEAL_II_WORDS_BIGENDIAN - -/* Define to 1 if you have the `gethostname' function. */ -#cmakedefine HAVE_GETHOSTNAME - -/* Define to 1 if you have the `getpid' function. */ -#cmakedefine HAVE_GETPID - -/* Define if you have the rand_r function */ -#cmakedefine HAVE_RAND_R - -/* Define to 1 if you have the `times' function. */ -#cmakedefine HAVE_TIMES - -/* Define to 1 if you have the `jn' function. */ -#cmakedefine HAVE_JN - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif -