]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make Wolfgang happy #2
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Sep 2012 19:37:00 +0000 (19:37 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Sep 2012 19:37:00 +0000 (19:37 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26678 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/README_CMAKE
deal.II/cmake/check/check_for_compiler_features.cmake
deal.II/cmake/check/check_for_cxx_features.cmake
deal.II/cmake/configure/configure_1_mpi.cmake
deal.II/cmake/configure/configure_1_tbb.cmake
deal.II/cmake/configure/configure_boost.cmake
deal.II/cmake/configure/configure_lapack.cmake
deal.II/cmake/configure/configure_p4est.cmake
deal.II/cmake/configure/configure_petsc.cmake
deal.II/cmake/configure/configure_trilinos.cmake

index 258ad1639e36dbfefbdc390539332b1c19402451..9352ceed5bec3a5b03dec8a79dfe1c308468fd81 100644 (file)
@@ -410,25 +410,35 @@ DEVELOPMENT
                             ============
 
 
-  To keep things clean, only the following cmake variables should be
-  altered in the platform checks and feature configuration
-  (beside setting a lot of DEAL_II_* definitions...):
+  To keep things clean, only the following variables should appended in the
+  platform checks and feature configuration (beside setting a lot of
+  DEAL_II_* definitions...):
 
 
   For internal use:
 
       CMAKE_SHARED_LINKER_FLAGS
+      DEAL_II_SHARED_LINKER_FLAGS_DEBUG
+      DEAL_II_SHARED_LINKER_FLAGS_RELEASE
+
           for setting necessary linker flags for the deal.II library.
 
       CMAKE_CXX_FLAGS (and CMAKE_C_FLAGS)
+      DEAL_II_CXX_FLAGS_DEBUG (and DEAL_II_C_FLAGS_DEBUG)
+      DEAL_II_CXX_FLAGS_RELEASE (and DEAL_II_C_FLAGS_RELEASE)
+
           for setting necessary compiler flags, e.g. -std=c++11 (if
           available).
 
       INCLUDE_DIRECTORIES(...)
+
           For setting necessary include dirs for the compilation of the
           deal.II library.
 
-      ADD_DEFINITIONS(...)
+      DEAL_II_DEFINITIONS
+      DEAL_II_DEFINITIONS_DEBUG
+      DEAL_II_DEFINITIONS_RELEASE
+
           For setting necessary preprocessor definitions ("-D<...>") for
           the compilation of the deal.II library
 
@@ -440,18 +450,22 @@ DEVELOPMENT
   For internal and external use:
 
       DEAL_II_EXTERNAL_LIBRARIES
+      DEAL_II_EXTERNAL_LIBRARIES_DEBUG
+      DEAL_II_EXTERNAL_LIBRARIES_RELEASE
           Used to keep track of external libraries, the deal.II library
           and user programs have to be linked against.
 
 
   For external use:
 
-      DEAL_II_EXTERNAL_DEFINITIONS
+      DEAL_II_USER_DEFINITIONS
+      DEAL_II_USER_DEFINITIONS_DEBUG
+      DEAL_II_USER_DEFINITIONS_RELEASE
           Used to keep track of external preprocessor definitions,
           necessary for the compilation of user programs.
 
 
-      DEAL_II_EXTERNAL_INCLUDE_DIRS
+      DEAL_II_USER_INCLUDE_DIRS
           Used to keep track of external include dirs, necessary for the
           compilation of user programs.
 
index c5f0ba59c1610ee304712b2ebbaa6277e4940378..61dc4fb87c7979069305d58c15949309682386c6 100644 (file)
@@ -397,7 +397,7 @@ ENDIF()
 # so don't run the test on cygwin.
 #
 IF(NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS_DEBUG "-Wa,--compress-debug-sections")
-  ENABLE_IF_SUPPORTED(CMAKE_C_FLAGS_DEBUG "-Wa,--compress-debug-sections")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-Wa,--compress-debug-sections")
+  ENABLE_IF_SUPPORTED(DEAL_II_C_FLAGS_DEBUG "-Wa,--compress-debug-sections")
 ENDIF()
 
index 30e86e00ae1f9758d86b6b55cff40f66d532d060..f3483e47d5638abe3301e2b47b36fa5851c89923 100644 (file)
@@ -151,7 +151,7 @@ IF(DEAL_II_HAVE_CXX11_FLAG)
     MESSAGE(STATUS "Insufficient C++11 support. Disabling -std=c++0x.")
   ENDIF()
 
-  IF(DEAL_II_CAN_USE_CXX1X)
+  IF(DEAL_II_CAN_USE_CXX11)
     #
     # Also test for a couple of C++11 things that we don't use in the
     # library but that users may want to use in their applications and that
index c816fac89b1878fab518ce9be9f743e181afa255..2b824ee9b73a7dbf0b2b396f7a83c92e319ad680 100644 (file)
@@ -26,7 +26,7 @@ MACRO(FEATURE_MPI_CONFIGURE_EXTERNAL var)
   INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
 
   # The user has to know the location of the mpi headers as well:
-  LIST(APPEND DEAL_II_EXTERNAL_INCLUDE_DIRS ${MPI_CXX_INCLUDE_PATH})
+  LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${MPI_CXX_INCLUDE_PATH})
 
   # TODO: Set up the rest:
 
index 353ef9edf71c99479da7362e76f28a28a22b6d50..97d63bb986848817cf48ce1864b9f3dd7db050d3 100644 (file)
@@ -24,7 +24,7 @@ MACRO(SETUP_THREADING var)
     SET(DEAL_II_USE_MT TRUE)
 
     #
-    # Set up some posix threads specific configuration toggles:
+    # Set up some posix thread specific configuration toggles:
     #
     IF(CMAKE_USE_PTHREADS_INIT)
       SET(DEAL_II_USE_MT_POSIX TRUE)
@@ -72,8 +72,8 @@ MACRO(SETUP_THREADING var)
     STRIP_FLAG(CMAKE_REQUIRED_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
 
     IF(NOT DEAL_II_HAVE_SANE_MT_DEFINITIONS)
-      ADD_DEFINITIONS("-D_REENTRANT" "-D_THREAD_SAFE")
-      LIST(APPEND DEAL_II_EXTERNAL_DEFINITIONS "-D_REENTRANT" "-D_THREAD_SAFE") # TODO: Necessary?
+      LIST(APPEND DEAL_II_DEFINITIONS "-D_REENTRANT" "-D_THREAD_SAFE")
+      LIST(APPEND DEAL_II_USER_DEFINITIONS "-D_REENTRANT" "-D_THREAD_SAFE") # TODO: Necessary?
     ENDIF()
 
   ENDIF(Threads_FOUND)
@@ -100,18 +100,22 @@ MACRO(FEATURE_TBB_CONFIGURE_EXTERNAL var)
 
   IF (CMAKE_BUILD_TYPE MATCHES "Debug")
     IF(TBB_DEBUG_FOUND)
-      LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${TBB_DEBUG_LIBRARY})
-      ADD_DEFINITIONS("-DTBB_USE_DEBUG=1" "-DTBB_DO_ASSERT=1")
+      LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG ${TBB_DEBUG_LIBRARY})
+      LIST(APPEND DEAL_II_DEFINITIONS_DEBUG
+        "-DTBB_USE_DEBUG=1"
+        "-DTBB_DO_ASSERT=1"
+        )
     ELSE()
       MESSAGE(STATUS
-        "deal.II was configured with CMAKE_BUILD_TYPE=Debug but no debug tbb "
-        "library was found. The regular tbb library will be used instead."
+        "No debug tbb library was found. "
+        "The regular tbb lib will be used for the debug target instead."
         )
-      LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${TBB_LIBRARY})
+      LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG ${TBB_LIBRARY})
     ENDIF()
+  ENDIF()
 
-  ELSE()
-    LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${TBB_LIBRARY})
+  IF (CMAKE_BUILD_TYPE MATCHES "Release")
+    LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_RELEASE ${TBB_LIBRARY})
   ENDIF()
 
   # Setup threading and if successfull return TRUE:
@@ -143,7 +147,9 @@ MACRO(FEATURE_TBB_CONFIGURE_CONTRIB var)
   # Add some definitions to use the header files in debug mode:
   #
   IF (CMAKE_BUILD_TYPE MATCHES "Debug")
-    ADD_DEFINITIONS("-DTBB_DO_DEBUG=1" "-DTBB_DO_ASSERT=1")
+    LIST(APPEND DEAL_II_DEFINITIONS_DEBUG
+      "-DTBB_DO_DEBUG=1" "-DTBB_DO_ASSERT=1"
+      )
   ENDIF()
 
   INCLUDE_DIRECTORIES(
index 467239ad8232bd6cbd79c0066ddc51121fb4c500..f1ef23ce9c449fe1251ca62f937e4acfbb1e3b16 100644 (file)
@@ -33,11 +33,13 @@ MACRO(FEATURE_BOOST_CONFIGURE_EXTERNAL var)
   INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIR})
 
   IF (CMAKE_BUILD_TYPE MATCHES "Debug")
-    LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
+    LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG
       ${Boost_THREAD_LIBRARY_DEBUG} ${Boost_SERIALIZATION_LIBRARY_DEBUG}
       )
-  ELSE()
-    LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
+  ENDIF()
+
+  IF (CMAKE_BUILD_TYPE MATCHES "Release")
+    LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_RELEASE
       ${Boost_THREAD_LIBRARY_RELEASE} ${Boost_SERIALIZATION_LIBRARY_RELEASE}
       )
   ENDIF()
@@ -58,8 +60,12 @@ MACRO(FEATURE_BOOST_CONFIGURE_CONTRIB var)
   # We need to set some definitions to use the headers of the bundled boost
   # library:
   #
-  ADD_DEFINITIONS("-DBOOST_NO_HASH" "-DBOOST_NO_SLIST")
-  LIST(APPEND DEAL_II_EXTERNAL_DEFINIITONS "-DBOOST_NO_HASH" "-DBOOST_NO_SLIST")
+  LIST(APPEND DEAL_II_DEFINITIONS
+    "-DBOOST_NO_HASH" "-DBOOST_NO_SLIST"
+    )
+  LIST(APPEND DEAL_II_USER_DEFINIITONS
+    "-DBOOST_NO_HASH" "-DBOOST_NO_SLIST"
+    )
 
   INCLUDE_DIRECTORIES(
     ${CMAKE_SOURCE_DIR}/contrib/boost-1.49.0/include
@@ -73,9 +79,9 @@ MACRO(FEATURE_BOOST_CONFIGURE_CONTRIB var)
     $<TARGET_OBJECTS:obj_boost_serialization>
     )
 
-  IF( DEAL_II_USE_MT AND NOT DEAL_II_CAN_USE_CXX1X)
+  IF( DEAL_II_USE_MT AND NOT DEAL_II_CAN_USE_CXX11)
     #
-    # If the C++ compiler doesn't completely support the C++1x standard
+    # If the C++ compiler doesn't completely support the C++11 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
index 33de4350edd497ea5e57246fa79eab3e1684f8f9..842e5cfc61f238a05bdd198efb40a5213a10d0b5 100644 (file)
@@ -22,7 +22,6 @@ MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL var)
     ${LAPACK_LIBRARIES}
     )
 
-
   #
   # TODO: Reduce to the really necessary parts.
   #
@@ -66,7 +65,6 @@ MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL var)
   LIST(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "${LAPACK_LIBRARIES}")
   STRIP_FLAG(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
 
-
   SET(HAVE_LIBLAPACK TRUE)
 
   SET(${var} TRUE)
index 8316026eb5b11fa6e06e8a21229b615b00d616a1..3dc89cf85df9199dab2ee63fb79f152556d2235a 100644 (file)
@@ -47,25 +47,26 @@ MACRO(FEATURE_P4EST_CONFIGURE_EXTERNAL var)
   INCLUDE_DIRECTORIES(${P4EST_INCLUDE_DIR} ${SC_INCLUDE_DIR})
 
   # The user has to know the location of the p4est headers as well:
-  LIST(APPEND DEAL_II_EXTERNAL_INCLUDE_DIRS ${P4EST_INCLUDE_DIR} ${SC_INCLUDE_DIR})
+  LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${P4EST_INCLUDE_DIR} ${SC_INCLUDE_DIR})
 
   IF (CMAKE_BUILD_TYPE MATCHES "Debug")
     IF(P4EST_DEBUG_FOUND AND SC_DEBUG_FOUND)
-      LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
+      LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG
         ${P4EST_DEBUG_LIBRARY} ${SC_DEBUG_LIBRARY}
         )
     ELSE()
-      MESSAGE(WARNING "\n"
-        "deal.II was configured with CMAKE_BUILD_TYPE=Debug but no debug p4est and\n"
-        "sc libraries were found. The regular p4est and sc libraries will be used\n"
-        "instead.\n\n"
+      MESSAGE(STATUS
+        "No debug p4est and sc libraries were found. "
+        "The regular p4est and sc libs will be used for the debug target instead."
         )
-      LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
+      LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG
         ${P4EST_LIBRARY} ${SC_LIBRARY}
         )
     ENDIF()
-  ELSE()
-    LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
+  ENDIF()
+
+  IF (CMAKE_BUILD_TYPE MATCHES "Release")
+    LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_RELEASE
       ${P4EST_LIBRARY} ${SC_LIBRARY}
       )
   ENDIF()
index 67bbe8a50378323e9fccb98543a7314465f781cc..a245e4a873be610a3a7aac55cd0f75aab97ef372 100644 (file)
@@ -50,8 +50,8 @@ MACRO(FEATURE_PETSC_CONFIGURE_EXTERNAL var)
 
   INCLUDE_DIRECTORIES(${PETSC_INCLUDE_DIRS})
 
-  # The user has to know the location of the petsc headers as well: # TODO
-  # LIST(APPEND DEAL_II_EXTERNAL_INCLUDE_DIRS ${PETSC_INCLUDE_DIRS})
+  # The user has to know the location of the petsc headers as well: # TODO: Really?
+  # LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${PETSC_INCLUDE_DIRS})
 
   LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
     ${PETSC_LIBRARIES}
index cb92849238440b7ef7dd49b1e50e294d248ed12e..4c3770cb777dde9c86775ec0d0d2e8cd2a27fbc7 100644 (file)
@@ -129,8 +129,8 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
       STRIP_FLAG(CMAKE_REQUIRED_FLAGS "-DHAS_C99_TR1_CMATH")
 
       IF(TRILINOS_HAS_C99_TR1_WORKAROUND)
-        ADD_DEFINITIONS("-DHAS_C99_TR1_CMATH")
-        LIST(APPEND DEAL_II_EXTERNAL_DEFINITIONS "-DHAS_C99_TR1_CMATH")
+        LIST(APPEND DEAL_II_DEFINITIONS "-DHAS_C99_TR1_CMATH")
+        LIST(APPEND DEAL_II_USER_DEFINITIONS "-DHAS_C99_TR1_CMATH")
       ELSE()
         MESSAGE(WARNING "\n"
           "Your Trilinos installation is not compatible with the C++ standard selected for\n"
@@ -150,7 +150,7 @@ MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL var)
   INCLUDE_DIRECTORIES(${TRILINOS_INCLUDE_DIRS})
 
   # The user has to know the location of the trilinos headers as well:
-  LIST(APPEND DEAL_II_EXTERNAL_INCLUDE_DIRS ${TRILINOS_INCLUDE_DIRS})
+  LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${TRILINOS_INCLUDE_DIRS})
 
 
   LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES

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.