]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Reorganize comments and spacing
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 20 Sep 2012 00:10:43 +0000 (00:10 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 20 Sep 2012 00:10:43 +0000 (00:10 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26539 0785d39b-7218-0410-832d-ea1e28bc413d

27 files changed:
deal.II/contrib/cmake/configure/configure_1_mpi.cmake
deal.II/contrib/cmake/configure/configure_1_tbb.cmake
deal.II/contrib/cmake/configure/configure_arpack.cmake
deal.II/contrib/cmake/configure/configure_blas.cmake
deal.II/contrib/cmake/configure/configure_boost.cmake
deal.II/contrib/cmake/configure/configure_doxygen.cmake
deal.II/contrib/cmake/configure/configure_functionparser.cmake
deal.II/contrib/cmake/configure/configure_lapack.cmake
deal.II/contrib/cmake/configure/configure_metis.cmake
deal.II/contrib/cmake/configure/configure_netcdf.cmake
deal.II/contrib/cmake/configure/configure_p4est.cmake
deal.II/contrib/cmake/configure/configure_trilinos.cmake
deal.II/contrib/cmake/configure/configure_umfpack.cmake
deal.II/contrib/cmake/configure/configure_zlib.cmake
deal.II/contrib/cmake/modules/FindAMD.cmake
deal.II/contrib/cmake/modules/FindARPACK.cmake
deal.II/contrib/cmake/modules/FindMETIS.cmake
deal.II/contrib/cmake/modules/FindNETCDF.cmake
deal.II/contrib/cmake/modules/FindP4EST.cmake
deal.II/contrib/cmake/modules/FindTBB.cmake
deal.II/contrib/cmake/modules/FindTRILINOS.cmake
deal.II/contrib/cmake/modules/FindUMFPACK.cmake
deal.II/contrib/cmake/setup_cached_variables.cmake
deal.II/contrib/cmake/setup_compiler_flags.cmake
deal.II/contrib/cmake/setup_compiler_flags_gnu.cmake
deal.II/contrib/cmake/setup_compiler_flags_icc.cmake [new file with mode: 0644]
deal.II/contrib/cmake/setup_finalize.cmake

index d3468f04697b22cda714243828f126d58af23f50..0f7f165c3762ea5964816e4f0c9fad1f7232323c 100644 (file)
@@ -3,13 +3,11 @@
 #
 
 MACRO(FEATURE_MPI_FIND_EXTERNAL var)
-
   FIND_PACKAGE(MPI)
 
   IF(MPI_CXX_FOUND)
     SET(${var} TRUE)
   ENDIF()
-
 ENDMACRO()
 
 
@@ -22,18 +20,12 @@ MACRO(FEATURE_MPI_CONFIGURE_EXTERNAL var)
 
   SET(DEAL_II_COMPILER_SUPPORTS_MPI TRUE)
 
-
   # TODO: (Maybe) set up the rest:
-
   #MPI_CXX_COMPILER        MPI Compiler wrapper for CXX
-
-
-  #MPIEXEC                    Executable for running MPI programs
-  #MPIEXEC_NUMPROC_FLAG       Flag to pass to MPIEXEC before giving
-  #                           it the number of processors to run on
-  #MPIEXEC_PREFLAGS           Flags to pass to MPIEXEC directly
-  #                           before the executable to run.
-  #MPIEXEC_POSTFLAGS          Flags to pass to MPIEXEC after other flags
+  #MPIEXEC                 Executable for running MPI programs
+  #MPIEXEC_NUMPROC_FLAG    Flag to pass to MPIEXEC before giving it the number of processors to run on
+  #MPIEXEC_PREFLAGS        Flags to pass to MPIEXEC directly before the executable to run.
+  #MPIEXEC_POSTFLAGS       Flags to pass to MPIEXEC after other flags
 
   SET(${var} TRUE)
 ENDMACRO()
@@ -51,3 +43,4 @@ ENDMACRO()
 
 
 CONFIGURE_FEATURE(MPI)
+
index 4cd93ee4a9b1edd8356d49ce090da2e5ed191829..7887bd771b34df1f486d85957d31fe610c1eaa4c 100644 (file)
@@ -1,11 +1,11 @@
 #
-# Configuration for the tbb library:
+# Configuration for tbb support:
 #
 
 
 #
-# Set up genereal threading. The macro will be included in
-# CONFIGURE_FEATURE_TBB_EXTERNAL/CONTRIB:
+# Set up genereal threading:
+# The macro will be included in CONFIGURE_FEATURE_TBB_EXTERNAL/CONTRIB.
 #
 MACRO(SETUP_THREADING var)
   FIND_PACKAGE(Threads)
@@ -16,9 +16,7 @@ MACRO(SETUP_THREADING var)
     #
     # We support threading. Go on and configure the rest:
     #
-
     ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
-
     SET(DEAL_II_USE_MT TRUE)
 
     #
@@ -27,10 +25,10 @@ MACRO(SETUP_THREADING var)
     IF(CMAKE_USE_PTHREADS_INIT)
       SET(DEAL_II_USE_MT_POSIX TRUE)
 
+      #
       # Check whether posix thread barriers are available:
-
+      #
       LIST(APPEND CMAKE_REQUIRED_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
-
       CHECK_CXX_SOURCE_COMPILES(
       "
       #include <pthread.h>
@@ -44,12 +42,12 @@ MACRO(SETUP_THREADING var)
       }
       "
       DEAL_II_HAVE_MT_POSIX_BARRIERS)
-
       LIST(REMOVE_ITEM CMAKE_REQUIRED_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
 
       IF(NOT DEAL_II_HAVE_MT_POSIX_BARRIERS)
         SET(DEAL_II_USE_MT_POSIX_NO_BARRIERS TRUE)
       ENDIF()
+
     ENDIF()
 
     #
@@ -57,7 +55,6 @@ MACRO(SETUP_THREADING var)
     # switches on some preprocessor flags. If this is not the case,
     # then define them explicitely.
     #
-
     LIST(APPEND CMAKE_REQUIRED_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
     CHECK_CXX_SOURCE_COMPILES(
       "
@@ -84,13 +81,11 @@ ENDMACRO()
 #
 
 MACRO(FEATURE_TBB_FIND_EXTERNAL var)
-
   FIND_PACKAGE(TBB)
 
   IF(TBB_FOUND)
     SET(${var} TRUE)
   ENDIF()
-
 ENDMACRO()
 
 
@@ -126,18 +121,18 @@ MACRO(FEATURE_TBB_CONFIGURE_CONTRIB var)
   # Add tbb directly to the object files of deal.II
   #
 
+  #
   # Setup threading (before configuring our build...)
   # and if successfull return TRUE:
+  #
   SETUP_THREADING(${var})
 
-
   #
   # We have to disable a bunch of warnings:
   #
   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-parentheses")
   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-long-long")
 
-
   INCLUDE_DIRECTORIES(
     ${CMAKE_SOURCE_DIR}/contrib/tbb/tbb30_104oss/include
     )
@@ -148,8 +143,8 @@ MACRO(FEATURE_TBB_CONFIGURE_CONTRIB var)
     $<TARGET_OBJECTS:obj_tbb>
     )
 
-
 ENDMACRO()
 
 
 CONFIGURE_FEATURE(TBB)
+
index 04abc3ad21f625d0916ed795d131b64c2273801a..b08baa0455f9ff29c51d3af39f37e63beb990700 100644 (file)
@@ -3,18 +3,15 @@
 #
 
 MACRO(FEATURE_ARPACK_FIND_EXTERNAL var)
-
   FIND_PACKAGE(ARPACK)
 
   IF(ARPACK_FOUND)
     SET(${var} TRUE)
   ENDIF()
-
 ENDMACRO()
 
 
 MACRO(FEATURE_ARPACK_CONFIGURE_EXTERNAL var)
-
   INCLUDE_DIRECTORIES(${ARPACK_INCLUDE_DIR})
   LIST(APPEND deal_ii_external_libraries ${ARPACK_LIBRARY})
 
@@ -25,3 +22,4 @@ ENDMACRO()
 
 
 CONFIGURE_FEATURE(ARPACK)
+
index 023f19f12cb3803bc7a172d1546944cc708f3897..395d1dfaf7257423087b4262fc555fefbcc9ca69 100644 (file)
@@ -3,18 +3,15 @@
 #
 
 MACRO(FEATURE_BLAS_FIND_EXTERNAL var)
-
   FIND_PACKAGE(BLAS)
 
   IF(BLAS_FOUND)
     SET(${var} TRUE)
   ENDIF()
-
 ENDMACRO()
 
 
 MACRO(FEATURE_BLAS_CONFIGURE_EXTERNAL var)
-
   ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${BLAS_LINKER_FLAGS}")
 
   LIST(APPEND deal_ii_external_libraries
@@ -28,3 +25,4 @@ ENDMACRO()
 
 
 CONFIGURE_FEATURE(BLAS)
+
index 98287a12dcb561db8cded184fb2610dc0bef1903..ca45d7d74487946fdab0c842f81e8e4e6e213f13 100644 (file)
@@ -24,7 +24,6 @@ ENDIF()
 
 
 MACRO(FEATURE_BOOST_FIND_EXTERNAL var)
-
   FIND_PACKAGE (Boost COMPONENTS serialization thread)
 
   IF(Boost_THREAD_FOUND AND Boost_SERIALIZATION_FOUND)
@@ -33,7 +32,6 @@ MACRO(FEATURE_BOOST_FIND_EXTERNAL var)
     # Get rid of this annoying unimportant variable:
     MARK_AS_ADVANCED(Boost_DIR)
   ENDIF()
-
 ENDMACRO()
 
 
@@ -59,11 +57,14 @@ SET(FEATURE_BOOST_HAVE_CONTRIB TRUE)
 
 
 MACRO(FEATURE_BOOST_CONFIGURE_CONTRIB var)
-
+  #
   # compile the necessary parts of boost out of ./contrib
+  #
 
+  #
   # We need to set some definitions to use the headers of the bundled boost
   # library:
+  #
   ADD_DEFINITIONS("-DBOOST_NO_HASH" "-DBOOST_NO_SLIST")
 
   INCLUDE_DIRECTORIES(
@@ -79,12 +80,13 @@ MACRO(FEATURE_BOOST_CONFIGURE_CONTRIB var)
     )
 
   IF( DEAL_II_USE_MT AND NOT DEAL_II_CAN_USE_CXX1X)
+    #
     # If the C++ compiler doesn't completely support the C++1x standard
     # (and consequently we can't use std::thread, std::mutex, etc), then
     # include all the files that form BOOST's thread implementation so that
     # we don't have to build BOOST itself only to get at this small part of
     # it. it also ensures that we use the correct compiler and flags
-
+    #
     ADD_SUBDIRECTORY(
       ${CMAKE_SOURCE_DIR}/contrib/boost-1.49.0/libs/thread/src
       )
index 3a3177d614d9cea4737e3a7ebc222af7d5b64162..6831e0713f76c2e133697a2285467e7b7bb0e610 100644 (file)
@@ -3,7 +3,6 @@
 #
 
 MACRO(FEATURE_DOXYGEN_FIND_EXTERNAL var)
-
   FIND_PACKAGE(Doxygen)
 
   #
@@ -12,12 +11,10 @@ MACRO(FEATURE_DOXYGEN_FIND_EXTERNAL var)
   IF(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
     SET(${var} TRUE)
   ENDIF()
-
 ENDMACRO()
 
 
 MACRO(FEATURE_DOXYGEN_CONFIGURE_EXTERNAL var)
-
   #
   # The FindDoxygen defines for us:
   #
@@ -33,7 +30,6 @@ MACRO(FEATURE_DOXYGEN_CONFIGURE_EXTERNAL var)
   #
 
   SET(${var} TRUE)
-
 ENDMACRO()
 
 
index 4b7bf48748a53ccd28b0c11d46a7406e6e807565..51fd8d4dcd83bd0e198153f9cb1f26ddf7fc6228 100644 (file)
@@ -13,8 +13,9 @@ SET(FEATURE_FUNCTIONPARSER_HAVE_CONTRIB TRUE)
 
 
 MACRO(FEATURE_FUNCTIONPARSER_CONFIGURE_CONTRIB var)
-
+  #
   # compile the necessary parts of functionparser out of ./contrib
+  #
 
   INCLUDE_DIRECTORIES(
     ${CMAKE_SOURCE_DIR}/contrib/functionparser/
@@ -36,3 +37,4 @@ ENDMACRO()
 
 
 CONFIGURE_FEATURE(FUNCTIONPARSER)
+
index 1c7d8830b27399ef76140e193f8224f1a8f0542c..1bed7ff8c3fef517733c3d444ba06661070c1f9a 100644 (file)
@@ -3,13 +3,11 @@
 #
 
 MACRO(FEATURE_LAPACK_FIND_EXTERNAL var)
-
   FIND_PACKAGE(LAPACK)
 
   IF(LAPACK_FOUND)
     SET(${var} TRUE)
   ENDIF()
-
 ENDMACRO()
 
 
@@ -21,12 +19,12 @@ MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL var)
     ${LAPACK_LIBRARIES}
     )
 
-  LIST(APPEND CMAKE_REQUIRED_LIBRARIES "${LAPACK_LIBRARIES}")
-  LIST(APPEND CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
 
   #
   # TODO: Reduce to the really necessary parts.
   #
+  LIST(APPEND CMAKE_REQUIRED_LIBRARIES "${LAPACK_LIBRARIES}")
+  LIST(APPEND CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
   CHECK_FUNCTION_EXISTS(daxpy_ HAVE_DAXPY_)
   CHECK_FUNCTION_EXISTS(dgeevx_ HAVE_DGEEVX_)
   CHECK_FUNCTION_EXISTS(dgeev_ AVE_DGEEV_)
@@ -44,7 +42,6 @@ MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL var)
   CHECK_FUNCTION_EXISTS(dstev_ AVE_DSTEV_)
   CHECK_FUNCTION_EXISTS(dsyevx_ HAVE_DSYEVX_)
   CHECK_FUNCTION_EXISTS(dsygvx_ HAVE_DSYGVX_)
-
   CHECK_FUNCTION_EXISTS(saxpy_ HAVE_SAXPY_)
   CHECK_FUNCTION_EXISTS(sgeevx_ HAVE_SGEEVX_)
   CHECK_FUNCTION_EXISTS(sgeev_ HAVE_SGEEV_)
@@ -62,12 +59,11 @@ MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL var)
   CHECK_FUNCTION_EXISTS(sstev_ HAVE_SSTEV_)
   CHECK_FUNCTION_EXISTS(ssyevx_ HAVE_SSYEVX_)
   CHECK_FUNCTION_EXISTS(ssygvx_ HAVE_SSYGVX_)
-
   CHECK_FUNCTION_EXISTS(strtrs_ HAVE_STRTRS_)
-
   LIST(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "${LAPACK_LIBRARIES}")
   LIST(REMOVE_ITEM CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
 
+
   SET(HAVE_LIBLAPACK TRUE)
 
   SET(${var} TRUE)
@@ -76,3 +72,4 @@ ENDMACRO()
 
 
 CONFIGURE_FEATURE(LAPACK)
+
index 7c81afe45b6cc774b04104d2a612429444a0dc52..a9f2605744360ec91fc85ddfa84ebffe5edd1819 100644 (file)
@@ -3,7 +3,6 @@
 #
 
 MACRO(FEATURE_METIS_FIND_EXTERNAL var)
-
   FIND_PACKAGE(METIS)
 
   IF(METIS_FOUND AND METIS_MAJOR GREATER 4)
@@ -14,12 +13,10 @@ MACRO(FEATURE_METIS_FIND_EXTERNAL var)
       "Version 5.x required!"
       )
   ENDIF()
-
 ENDMACRO()
 
 
 MACRO(FEATURE_METIS_CONFIGURE_EXTERNAL var)
-
   INCLUDE_DIRECTORIES(${METIS_INCLUDE_DIR})
   LIST(APPEND deal_ii_external_libraries ${METIS_LIBRARY})
 
@@ -30,3 +27,4 @@ ENDMACRO()
 
 
 CONFIGURE_FEATURE(METIS)
+
index e5f2eba600351c0ca89ca9ad27bc6cf97b1cddcb..4aa284fc05187a7a842bc0b5b6566ec2bc1c8129 100644 (file)
@@ -3,18 +3,15 @@
 #
 
 MACRO(FEATURE_NETCDF_FIND_EXTERNAL var)
-
   FIND_PACKAGE(NETCDF)
 
   IF(NETCDF_FOUND)
     SET(${var} TRUE)
   ENDIF()
-
 ENDMACRO()
 
 
 MACRO(FEATURE_NETCDF_CONFIGURE_EXTERNAL var)
-
   INCLUDE_DIRECTORIES(${NETCDF_INCLUDE_DIR})
   LIST(APPEND deal_ii_external_libraries ${NETCDF_LIBRARY})
   SET(HAVE_LIBNETCDF TRUE)
@@ -24,3 +21,4 @@ ENDMACRO()
 
 
 CONFIGURE_FEATURE(NETCDF)
+
index 9dea4a18edb30029658bde7776e029d881b98846..469ce39c5070898e335597e8f0213c70482d4d1a 100644 (file)
@@ -9,7 +9,6 @@ SET(FEATURE_P4EST_DEPENDS
 
 
 MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
-
   FIND_PACKAGE(P4EST)
   FIND_PACKAGE(SC)
 
@@ -20,12 +19,10 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
   IF(P4EST_FOUND AND SC_FOUND)
     SET(${var} TRUE)
   ENDIF()
-
 ENDMACRO()
 
 
 MACRO(FEATURE_P4EST_CONFIGURE_EXTERNAL var)
-
   INCLUDE_DIRECTORIES(${P4EST_INCLUDE_DIR} ${SC_INCLUDE_DIR})
 
   IF (CMAKE_BUILD_TYPE MATCHES "Debug")
@@ -52,7 +49,6 @@ MACRO(FEATURE_P4EST_CONFIGURE_EXTERNAL var)
   SET(DEAL_II_USE_P4EST TRUE)
 
   SET(${var} TRUE)
-
 ENDMACRO()
 
 
@@ -70,3 +66,4 @@ ENDMACRO()
 
 
 CONFIGURE_FEATURE(P4EST)
+
index 0208b8c2347babe706baa78dc66cfaa745e0c998..7798de197407ba5c8f523b20a506d5e9f0af88ca 100644 (file)
@@ -4,14 +4,13 @@
 
 
 MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
-
   FIND_PACKAGE(TRILINOS)
 
   IF(TRILINOS_FOUND)
-    SET(${var} TRUE)
     #
     # So, we have a library. Let's see whether we can use it:
     #
+    SET(${var} TRUE)
 
 
     #
@@ -44,7 +43,6 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     ENDIF()
 
 
-
     #
     # Trilinos 10.6 had quite a number of bugs we ran into, see
     # for example
@@ -61,7 +59,6 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     ENDIF()
 
 
-
     #
     # The same is unfortunately true for 10.8.[01]:
     #   https://software.sandia.gov/bugzilla/show_bug.cgi?id=5370
@@ -78,12 +75,9 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     ENDIF()
 
 
-
     #
     # Trilinos has to be configured with the same MPI configuration as
-    # deal.II. TODO: Refine this check...
-    #
-
+    # deal.II.
     #
     # Epetra installs Epetra_MpiComm.h if configured trilinos was
     # configured with mpi. We use this as a check for the mpi configuration
@@ -103,7 +97,6 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     ENDIF()
 
 
-
     #
     # Some verions of Sacado_cmath.hpp does things that aren't compatible
     # with the -std=c++0x flag of GCC, see deal.II FAQ.
@@ -129,12 +122,10 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     ENDIF()
 
   ENDIF(TRILINOS_FOUND)
-
 ENDMACRO()
 
 
 MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL var)
-
   INCLUDE_DIRECTORIES(${TRILINOS_INCLUDE_DIR})
 
   LIST(APPEND deal_ii_external_libraries
@@ -158,14 +149,13 @@ MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL var)
   #  else and we better disable some of the warnings to enable us
   #  to see through the clutter.
   #
-
   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused")
   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-extra")
   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-overloaded-virtual")
 
   SET(${var} TRUE)
-
 ENDMACRO()
 
 
 CONFIGURE_FEATURE(TRILINOS)
+
index bed5192e39833c5c3795f92e0d7751ef5086e6f5..34b8ee1df4f40dccd65611f45a7f8ac8ee5307bf 100644 (file)
@@ -10,19 +10,16 @@ SET(FEATURE_UMFPACK_DEPENDS
 
 
 MACRO(FEATURE_UMFPACK_FIND_EXTERNAL var)
-
   FIND_PACKAGE(UMFPACK)
   FIND_PACKAGE(AMD)
 
   IF(UMFPACK_FOUND AND AMD_FOUND)
     SET(${var} TRUE)
   ENDIF()
-
 ENDMACRO()
 
 
 MACRO(FEATURE_UMFPACK_CONFIGURE_EXTERNAL var)
-
   INCLUDE_DIRECTORIES(${UMFPACK_INCLUDE_DIR} ${AMD_INCLUDE_DIR})
 
   LIST(APPEND deal_ii_external_libraries
@@ -32,7 +29,6 @@ MACRO(FEATURE_UMFPACK_CONFIGURE_EXTERNAL var)
   SET(HAVE_LIBUMFPACK TRUE)
 
   SET(${var} TRUE)
-
 ENDMACRO()
 
 
@@ -40,7 +36,6 @@ SET(FEATURE_UMFPACK_HAVE_CONTRIB TRUE)
 
 
 MACRO(FEATURE_UMFPACK_CONFIGURE_CONTRIB var)
-
   INCLUDE_DIRECTORIES(
     ${CMAKE_SOURCE_DIR}/contrib/umfpack/UMFPACK/Include
     ${CMAKE_SOURCE_DIR}/contrib/umfpack/AMD/Include
@@ -62,7 +57,6 @@ MACRO(FEATURE_UMFPACK_CONFIGURE_CONTRIB var)
   SET(HAVE_LIBUMFPACK TRUE)
 
   SET(${var} TRUE)
-
 ENDMACRO()
 
 
@@ -82,3 +76,4 @@ ENDMACRO()
 
 
 CONFIGURE_FEATURE(UMFPACK)
+
index b1291d9043699ec57dd62ceb21cd056dac9511af..1221050628a75758e6f07ee6c33d6fc8fa09693b 100644 (file)
@@ -3,25 +3,22 @@
 #
 
 MACRO(FEATURE_ZLIB_FIND_EXTERNAL var)
-
   FIND_PACKAGE(ZLIB)
 
   IF(ZLIB_FOUND)
     SET(${var} TRUE)
   ENDIF()
-
 ENDMACRO()
 
 
 MACRO(FEATURE_ZLIB_CONFIGURE_EXTERNAL var)
-
   INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
   LIST(APPEND deal_ii_external_libraries ${ZLIB_LIBRARIES})
   SET(HAVE_LIBZ TRUE)
 
   SET(${var} TRUE)
-
 ENDMACRO()
 
 
 CONFIGURE_FEATURE(ZLIB)
+
index 848d53711c4cfdad21a11c4d3064b53fddef739e..4b902084399f9e3465f5217d214cc4937e0d7166 100644 (file)
@@ -1,4 +1,6 @@
-# Try to find AMD
+#
+# Try to find the AMD library
+#
 
 INCLUDE(FindPackageHandleStandardArgs)
 
@@ -18,3 +20,4 @@ IF(AMD_FOUND)
     AMD_INCLUDE_DIR
   )
 ENDIF()
+
index 6479e4c3863b373856694a09ae760e63bcde422f..c98a121a82960c7bf3eead9aed56256d40dacba6 100644 (file)
@@ -1,4 +1,6 @@
-# Try to find ARPACK
+#
+# Try to find the ARPACK library
+#
 
 INCLUDE(FindPackageHandleStandardArgs)
 
@@ -14,3 +16,4 @@ IF(ARPACK_FOUND)
     ARPACK_LIBRARY
   )
 ENDIF()
+
index a61f1258364782ef482ba5d6ed925ffe0fb3f677..7dfb4c76a4de72f8f02dcdf1e6581c34b3e1edd8 100644 (file)
@@ -1,4 +1,6 @@
-# Try to find METIS
+#
+# Try to find the METIS library
+#
 
 INCLUDE(FindPackageHandleStandardArgs)
 
@@ -14,7 +16,6 @@ FIND_LIBRARY(METIS_LIBRARY
 #
 # 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}")
@@ -32,3 +33,4 @@ IF(METIS_FOUND)
     METIS_INCLUDE_DIR
   )
 ENDIF()
+
index bbb925c22325f17e835660577691ec43fee445c5..09c535fc758afb3547ec61f4b62392eeed0892d7 100644 (file)
@@ -1,4 +1,6 @@
-# Try to find NETCDF
+#
+# Try to find the NETCDF library
+#
 
 INCLUDE(FindPackageHandleStandardArgs)
 
@@ -18,3 +20,4 @@ IF(NETCDF_FOUND)
     NETCDF_INCLUDE_DIR
   )
 ENDIF()
+
index e8336b69d36231d0e8df86cfd41386f8b698eec2..af21eed2e20dca99865bec8e84216643f81db845 100644 (file)
@@ -1,4 +1,6 @@
-# Try to find P4EST
+#
+# Try to find the P4EST library
+#
 
 INCLUDE(FindPackageHandleStandardArgs)
 
@@ -24,3 +26,4 @@ IF(P4EST_FOUND)
     P4EST_INCLUDE_DIR
   )
 ENDIF()
+
index f8c8a418d5d1b02b27a8e88bb15fe17dab13b607..34d11008ada8252898e8c081b3dff92d87d1fd3b 100644 (file)
@@ -1,4 +1,6 @@
-# Try to find the Threading Building Blocks-library
+#
+# Try to find the Threading Building Blocks library
+#
 
 INCLUDE(FindPackageHandleStandardArgs)
 
@@ -25,3 +27,4 @@ IF(TBB_FOUND)
     TBB_INCLUDE_DIR
   )
 ENDIF()
+
index 0c1334efbba9addaf965cedbcd2da6430ec48e5e..78b6895dd8dc01fda2f4b9c90402548f54d11061 100644 (file)
@@ -1,4 +1,6 @@
-# Try to find the Trilinos
+#
+# Try to find the Trilinos library
+#
 
 INCLUDE(FindPackageHandleStandardArgs)
 
@@ -12,6 +14,9 @@ find_package(TRILINOS
   PATH_PREFIXES lib64/cmake/Trilinos lib/cmake/Trilinos
   )
 
+#
+# Extract the major and minor version numbers:
+#
 STRING(REGEX REPLACE
   "^([0-9]+).*$" "\\1"
   TRILINOS_MAJOR "${Trilinos_VERSION}")
@@ -25,7 +30,6 @@ STRING(REGEX REPLACE
   TRILINOS_SUBMINOR "${Trilinos_VERSION}")
 
 
-# TODO: Trilinos may export more than one include dir.
 FIND_PATH(TRILINOS_INCLUDE_DIR Trilinos_version.h
   HINTS ${Trilinos_INCLUDE_DIRS}
   )
@@ -59,3 +63,4 @@ IF(TRILINOS_FOUND)
     TRILINOS_LIBRARIES
     )
 ENDIF()
+
index 13b284727511a423d3a5160b697c160262446402..fe349e61fcc8af0b2bda3cd43bb1108985017c81 100644 (file)
@@ -1,4 +1,6 @@
-# Try to find UMFPACK
+#
+# Try to find the UMFPACK library
+#
 
 INCLUDE(FindPackageHandleStandardArgs)
 
@@ -18,3 +20,4 @@ IF(UMFPACK_FOUND)
     UMFPACK_INCLUDE_DIR
   )
 ENDIF()
+
index ea673de7f16083621fb65a2fc9cc151859afebaf..628e579888b02f06041d17129d2c6f654c75df6a 100644 (file)
@@ -1,5 +1,6 @@
 #
-# FAT NOTE:
+# Setup cached variables prior to the PROJECT(deal.II) call
+#
 #
 # We have a problem: We would like to setup our choice of C_FLAGS and
 # CXX_FLAGS but let the user overwrite it (if desired).
@@ -8,13 +9,14 @@
 #
 # We have to call PROJECT(deal.II) in order to set up the project and run
 # the C- and CXX-compiler detection and configuration. (Otherwise we cannot
-# compile anything and have no idea which compiler is selected.) In this
-# process CMAKE_{C|CXX}_FLAGS are already set to stupid default values.
+# compile anything and, furthermore,  have no idea which compiler is
+# selected.) In this process CMAKE_CXX_FLAGS[...] are already set to stupid
+# default values.
 # (And _cannot_ be sanely set from this script afterwards...)
 #
 # To mitigate this problem, we do the following:
 #
-#   - We initialize the cached CMAKE_{C|CXX}_FLAGS variables with empty
+#   - We initialize the cached CMAKE_CXX_FLAGS[...] variables with empty
 #     strings prior to initializing the compiler, so that no default values
 #     are set.
 #
 #
 #   - At the end of the configuration step we add <variables>_SAVED
 #     _AT THE END_ of the respective <variable> allowing the user to
-#     effectively overwrite our default setting.
+#     effectively overwrite our default settings.
 #
 
 
 #
 # Setup CMAKE_BUILD_TYPE:
 #
-
 SET(CMAKE_BUILD_TYPE
   "Release"
   CACHE STRING
   "Choose the type of build, options are: Debug Release.")
 
+
+#
+# This is cruel, I know. But it is better to only have a known number of
+# options for CMAKE_BUILD_TYPE...
+#
 IF( NOT CMAKE_BUILD_TYPE MATCHES "Release" AND
     NOT CMAKE_BUILD_TYPE MATCHES "Debug" )
-  #
-  # This is cruel, I know. But it is better to only have a known number of
-  # options for CMAKE_BUILD_TYPE...
-  #
   MESSAGE(FATAL_ERROR "CMAKE_BUILD_TYPE does neither match Release, nor Debug.")
 ENDIF()
 
+
 #
 # Set BUILD_SHARED_LIBS to default to ON:
 #
-SET(BUILD_SHARED_LIBS TRUE CACHE BOOL "Build a shared library")
+SET(BUILD_SHARED_LIBS ON CACHE OPTION "Build a shared library")
+
 
 #
 # Set cached compiler flags to an empty string:
 #
-
 SET(deal_ii_used_flags
   CMAKE_C_FLAGS
   CMAKE_CXX_FLAGS
@@ -67,8 +70,8 @@ SET(deal_ii_used_flags
   CMAKE_C_FLAGS_DEBUG
   CMAKE_CXX_FLAGS_DEBUG
   )
-
 FOREACH(flags ${deal_ii_used_flags})
+
   # "CACHE" ensures that we only set the variable if it is not already set
   # as a  cached variable, effectively we're setting a default value:
   SET(${flags} "" CACHE STRING
@@ -83,5 +86,6 @@ FOREACH(flags ${deal_ii_used_flags})
   #
   SET(${flags}_SAVED "${${flags}}")
   SET(${flags} "")
+
 ENDFOREACH()
 
index 94887aae165d746575bae0ce65f570c3803b84a2..c8bbce0b86ac381d4b903008a6a17da0d098d5b3 100644 (file)
@@ -1,15 +1,12 @@
 #
-# Setup default compiler flags:
+# Setup default compiler flags: This file sets up sensible default compiler
+# flags for the various platforms, compilers and build targets supported by
+# the deal.II library.
 #
-# This file sets up sensible default compiler flags for the various
-# platforms, compilers and build targets supported by the deal.II
-# library.
 #
-
-#
-#   ####################
-#   #     FAT NOTE:    #
-#   ####################
+# ####################
+# #     FAT NOTE:    #
+# ####################
 #
 # All configuration in setup_compiler_flags.cmake and
 # setup_compiler_flags_<compiler>.cmake shall ONLY consist of CFLAGS,
 
 
 #
-#   ######################
-#   #     FAT NOTE 2:    #
-#   ######################
+# We need a C compiler only for the compilation of the bundled umfpack
+# library, so we don't make much fuss about configuration and setup of the
+# C compiler and assume that CC and CXX are the same compiler brand, hence
+# supporting almost the same compiler flags.
+# (See setup in setup_compiler_flags_*.cmake)
 #
-# For the moment we assume that CC and CXX are the same compiler.
-# We need CC for the compilation of the bundled umfpack library only...
 # So, give a prominent error message in case CC and CXX differ:
 #
 IF(NOT ( ${CMAKE_C_COMPILER_ID} STREQUAL ${CMAKE_CXX_COMPILER_ID} AND
@@ -50,12 +47,10 @@ IF(NOT ( ${CMAKE_C_COMPILER_ID} STREQUAL ${CMAKE_CXX_COMPILER_ID} AND
 ENDIF()
 
 
-
-#
-# Setup CMAKE_CXX_FLAGS<_RELEASE|_DEBUG>:
-#
-
 IF(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
+  #
+  # *Hooray* We are allowed to set compiler flags :-]
+  #
   MESSAGE(STATUS "Set up default compiler flags.")
 
   #
@@ -67,44 +62,25 @@ IF(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
     SET(DEAL_II_KNOWN_COMPILER TRUE)
   ENDIF()
 
+  #
+  # Setup for ICC compiler:
+  #
+  IF( CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+    INCLUDE(setup_compiler_flags_intel)
+    SET(DEAL_II_KNOWN_COMPILER TRUE)
+  ENDIF()
+
 
   IF(NOT DEAL_II_KNOWN_COMPILER)
     MESSAGE(WARNING "\n"
-      "Unrecognized compiler!\n\n"
+      "Unrecognized compiler!\n"
       "Please set the relevant compiler options by hand.\n")
   ENDIF()
 
 ELSE(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
   MESSAGE(STATUS
-    "Skipped setting up default compiler flags "
+    "Skipped setup of default compiler flags "
     "(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS=OFF)"
     )
 ENDIF(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
 
-
-
-#
-# Setup CMAKE_C_FLAGS<_RELEASE|_DEBUG>:
-#
-
-#
-# For the moment we assume that CC and CXX are the same compiler and that
-# we can set (almost) the same default flags for both.
-#
-
-SET(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS})
-SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
-SET(CMAKE_C_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
-
-#
-# Strip flags not supported by a C target:
-#
-STRIP_FLAG(CMAKE_C_FLAGS "-Wsynth")
-STRIP_FLAG(CMAKE_C_FLAGS_RELEASE "-felide-constructors")
-
-#
-# Disable some warnings:
-#
-STRIP_FLAG(CMAKE_C_FLAGS "-Wall") # There is no other way to disable -Wunknown-pragma atm...
-STRIP_FLAG(CMAKE_C_FLAGS "-Wsign-compare")
-STRIP_FLAG(CMAKE_C_FLAGS "-Wwrite-strings")
index a127f5c1760b5c559d9eef4b27a0a866c481e499..2b23322e3bf6aa845d60840f5025a6cb77513ff0 100644 (file)
@@ -1,8 +1,8 @@
 #
 # General setup for GCC and compilers sufficiently close to GCC
 #
-# Please read the fat note in setup_compiler_flags.cmake prior to editing
-# this file.
+# Please read the fat note in setup_compiler_flags.cmake prior to
+# editing this file.
 #
 
 
@@ -98,7 +98,6 @@ IF(CMAKE_SYSTEM_NAME MATCHES "CYGWIN") # TODO: Check for correct name
 ENDIF()
 
 
-
 #################################
 #                               #
 #    For the Release target:    #
@@ -140,3 +139,32 @@ IF (CMAKE_BUILD_TYPE MATCHES "Debug")
     ENABLE_IF_SUPPORTED(CMAKE_SHARED_LINKER_FLAGS "-g")
   ENDIF()
 ENDIF()
+
+
+###############################################
+#                                             #
+#    Set up CMAKE_C_FLAGS<_RELEASE|_DEBUG>    #
+#                                             #
+###############################################
+
+#
+# For the moment we assume that CC and CXX are the same compiler and that
+# we can set (almost) the same default flags for both:
+#
+SET(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS})
+SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
+SET(CMAKE_C_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
+
+#
+# OK, touché, touché. We have to strip flags not supported by a C target:
+#
+STRIP_FLAG(CMAKE_C_FLAGS "-Wsynth")
+STRIP_FLAG(CMAKE_C_FLAGS_RELEASE "-felide-constructors")
+
+#
+# and disable some warnings:
+#
+STRIP_FLAG(CMAKE_C_FLAGS "-Wall") # There is no other way to disable -Wunknown-pragma atm...
+STRIP_FLAG(CMAKE_C_FLAGS "-Wsign-compare")
+STRIP_FLAG(CMAKE_C_FLAGS "-Wwrite-strings")
+
diff --git a/deal.II/contrib/cmake/setup_compiler_flags_icc.cmake b/deal.II/contrib/cmake/setup_compiler_flags_icc.cmake
new file mode 100644 (file)
index 0000000..e69de29
index 16593f1ee038b11a0c98969ac3c017370bc13370..d9b4625fc3282f74f688931d38e1cb0bd83edffb 100644 (file)
@@ -1,3 +1,7 @@
+#
+# Finalize the configuration:
+#
+
 #
 # Append the saved initial (cached) variables ${flags}_SAVED at the end of
 # ${flags}, see setup_cached_compiler_flags.cmake and the main
@@ -11,7 +15,6 @@ ENDFOREACH()
 #
 # And print out a nice configuration summary:
 #
-
 MESSAGE("
 
    *                                    *

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.