]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Break everything (tm).
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 1 Feb 2014 21:53:24 +0000 (21:53 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 1 Feb 2014 21:53:24 +0000 (21:53 +0000)
- Redesign complete feature configuration process

git-svn-id: https://svn.dealii.org/trunk@32368 0785d39b-7218-0410-832d-ea1e28bc413d

25 files changed:
deal.II/bundled/CMakeLists.txt
deal.II/cmake/checks/check_02_system_features.cmake
deal.II/cmake/config/CMakeLists.txt
deal.II/cmake/configure/configure_1_bzip2.cmake
deal.II/cmake/configure/configure_1_lapack.cmake
deal.II/cmake/configure/configure_1_mpi.cmake
deal.II/cmake/configure/configure_1_threads.cmake
deal.II/cmake/configure/configure_2_metis.cmake
deal.II/cmake/configure/configure_2_trilinos.cmake
deal.II/cmake/configure/configure_2_umfpack.cmake
deal.II/cmake/configure/configure_3_petsc.cmake
deal.II/cmake/configure/configure_boost.cmake
deal.II/cmake/configure/configure_functionparser.cmake
deal.II/cmake/configure/configure_hdf5.cmake
deal.II/cmake/configure/configure_mumps.cmake
deal.II/cmake/configure/configure_p4est.cmake
deal.II/cmake/configure/configure_slepc.cmake
deal.II/cmake/macros/macro_configure_feature.cmake
deal.II/cmake/macros/macro_deal_ii_add_library.cmake
deal.II/cmake/macros/macro_register_feature.cmake
deal.II/cmake/setup_finalize.cmake
deal.II/cmake/setup_write_config.cmake
deal.II/doc/developers/cmake-internals.html
deal.II/doc/news/changes.h
deal.II/source/CMakeLists.txt

index b4ff8c8bf6e05e0267b62f7fd68308de8b6b1b85..68855752ccaa0c2d1c8013a0ab6da2f9935fadc6 100644 (file)
@@ -28,10 +28,6 @@ IF(FEATURE_BOOST_BUNDLED_CONFIGURED)
     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)
 
   IF(DEAL_II_WITH_ZLIB)
@@ -59,10 +55,6 @@ IF(FEATURE_THREADS_BUNDLED_CONFIGURED)
     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()
 
index 20c158c6361c6f52a20857440ec35f32c7f73054..df8616c2cc8f12c6be58cf2358fb273db1ef6936 100644 (file)
@@ -72,7 +72,7 @@ IF(NOT m_LIBRARY MATCHES "-NOTFOUND")
   CHECK_CXX_SYMBOL_EXISTS("jn" "math.h" HAVE_JN)
   RESET_CMAKE_REQUIRED()
   IF(HAVE_JN)
-    LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${m_LIBRARY})
+    LIST(APPEND DEAL_II_LIBRARIES ${m_LIBRARY})
   ENDIF()
 ENDIF()
 
index 4ade81d2b2f00244685269d107ed2b8b293edae3..1789a4044d2e240de69f9d37ef429a3ff61bd6be 100644 (file)
 
 MESSAGE(STATUS "Setting up project configuration")
 
-#
-# 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
 #
@@ -140,7 +131,7 @@ SET(CONFIG_INCLUDE_DIRS
   \${DEAL_II_PATH}/include/deal.II
   ${CMAKE_SOURCE_DIR}/include/
   ${CMAKE_SOURCE_DIR}/include/deal.II
-  ${deal_ii_source_includes}
+  ${DEAL_II_BUNDLED_INCLUDE_DIRS}
   ${DEAL_II_USER_INCLUDE_DIRS}
   )
 CONFIGURE_FILE(
@@ -351,7 +342,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
     $(D)/install/deal.II
     ${CMAKE_SOURCE_DIR}/include/
     ${CMAKE_SOURCE_DIR}/include/deal.II
-    ${deal_ii_source_includes}
+    ${DEAL_II_BUNDLED_INCLUDE_DIRS}
     ${DEAL_II_USER_INCLUDE_DIRS}
     )
   CONFIGURE_FILE(
index 61fd319e7ed3c281f89ed447c6a25bd53f751c76..a905aad144d8b5e07a0b41245f65ea234b55b7fe 100644 (file)
 #
 
 MACRO(FEATURE_BZIP2_FIND_EXTERNAL var)
-
   FIND_PACKAGE(BZip2)
 
   IF(BZIP2_FOUND)
     #
-    # Rename some variables:
+    # Rename variables:
     #
     SET(BZIP2_VERSION ${BZIP2_VERSION_STRING})
     SET(BZIP2_INCLUDE_DIRS ${BZIP2_INCLUDE_DIR})
index ede31c24ba7fc2445ea38b585d5ab44be565dc3a..258af871f23cd4b9416bb89337aa875a6cb8f4bc 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -80,7 +80,6 @@ ENDMACRO()
 
 
 MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL)
-  REGISTER_FEATURE(LAPACK)
   CHECK_FOR_LAPACK_FUNCTIONS()
 ENDMACRO()
 
index 1927e8ecbdb92a2ab2c01a33074855480d0081bd..a73e27d962eab0c0599e3970196059bd0e546e8c 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -18,7 +18,7 @@
 # Configuration for mpi support:
 #
 # We look for the C and Fortran libraries as well because they are needed
-# by some external libraries:
+# by some external libraries for the link interface:
 #
 
 MACRO(FEATURE_MPI_FIND_EXTERNAL var)
@@ -137,6 +137,9 @@ MACRO(FEATURE_MPI_FIND_EXTERNAL var)
     SET(${var} TRUE)
   ENDIF()
 
+  # Hide some variables:
+  MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY MPI_LIBRARY MPI_MPI_H)
+
   #
   # Populate correct variables:
   #
@@ -145,19 +148,6 @@ MACRO(FEATURE_MPI_FIND_EXTERNAL var)
   SET(MPI_CXX_FLAGS ${MPI_CXX_COMPILE_FLAGS})
   SET(MPI_LINKER_FLAGS "${MPI_CXX_LINK_FLAGS}")
 
-  # Hide some variables:
-  MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY MPI_LIBRARY MPI_MPI_H)
-
-ENDMACRO()
-
-
-MACRO(FEATURE_MPI_CONFIGURE_EXTERNAL)
-  #
-  # The user has to know the location of the mpi headers as well:
-  #
-  SET(MPI_ADD_TO_USER_INCLUDE_DIRS TRUE)
-
-  REGISTER_FEATURE(MPI)
 ENDMACRO()
 
 
@@ -179,3 +169,8 @@ ENDMACRO()
 
 
 CONFIGURE_FEATURE(MPI)
+
+#
+# The user has to know the location of the mpi headers as well:
+#
+SET(MPI_USER_INCLUDE_DIRS ${MPI_INCLUDE_DIRS})
index c7265653bb70dbcdee547acd5dc13676c1d492eb..bc698ad5953e778c6e8fea1b8855a147306cd770 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -33,7 +33,7 @@ MACRO(SETUP_THREADING)
     #
     # 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.
+    # this case system libraries must be linked dynamically.
     #
     SWITCH_LIBRARY_PREFERENCE()
 
@@ -63,7 +63,7 @@ MACRO(SETUP_THREADING)
 
   IF(NOT Threads_FOUND)
     #
-    # TODO: This is a dead end. Threading might be setup with internal TBB
+    # TODO: This is a dead end. Threading might be set up with internal TBB
     # so we have no way of returning unsuccessfully...
     #
     MESSAGE(FATAL_ERROR
@@ -88,7 +88,7 @@ MACRO(SETUP_THREADING)
     ENDIF()
   ENDIF()
 
-  ADD_FLAGS(DEAL_II_LINKER_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
+  ADD_FLAGS(THREADS_LINKER_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
 
   #
   # Set up some posix thread specific configuration toggles:
@@ -152,13 +152,10 @@ ENDMACRO()
 
 MACRO(FEATURE_THREADS_CONFIGURE_EXTERNAL)
 
-  REGISTER_FEATURE(TBB)
-
-  # TODO: Refactor
   IF(CMAKE_BUILD_TYPE MATCHES "Debug")
     IF(TBB_WITH_DEBUG_LIB)
-      LIST(APPEND DEAL_II_DEFINITIONS_DEBUG "TBB_USE_DEBUG" "TBB_DO_ASSERT=1")
-      LIST(APPEND DEAL_II_USER_DEFINITIONS_DEBUG "TBB_USE_DEBUG" "TBB_DO_ASSERT=1")
+      LIST(APPEND THREADS_DEFINITIONS_DEBUG "TBB_USE_DEBUG" "TBB_DO_ASSERT=1")
+      LIST(APPEND THREADS_USER_DEFINITIONS_DEBUG "TBB_USE_DEBUG" "TBB_DO_ASSERT=1")
     ENDIF()
   ENDIF()
 
@@ -169,15 +166,14 @@ MACRO(FEATURE_THREADS_CONFIGURE_EXTERNAL)
   IF( DEAL_II_WITH_CXX11 AND
       NOT DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE AND
       NOT CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
-    LIST(APPEND DEAL_II_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1")
-    LIST(APPEND DEAL_II_USER_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1")
+    LIST(APPEND THREADS_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1")
+    LIST(APPEND THREADS_USER_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1")
   ENDIF()
 
   SETUP_THREADING()
 
-  # TODO: Refactor this mess of a configure file...
-  SET(THREADS_LIBRARIES ${TBB_LIBRARIES})
-  SET(THREADS_INCLUDE_DIRS ${TBB_INCLUDE_DIRS})
+  LIST(APPEND THREADS_LIBRARIES ${TBB_LIBRARIES})
+  LIST(APPEND THREADS_INCLUDE_DIRS ${TBB_INCLUDE_DIRS})
 
 ENDMACRO()
 
@@ -191,15 +187,15 @@ MACRO(FEATURE_THREADS_CONFIGURE_BUNDLED)
   #
   # We have to disable a bunch of warnings:
   #
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-parentheses")
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-long-long")
+  ENABLE_IF_SUPPORTED(THREADS_CXX_FLAGS "-Wno-parentheses")
+  ENABLE_IF_SUPPORTED(THREADS_CXX_FLAGS "-Wno-long-long")
 
   #
   # Add some definitions to use the header files in debug mode:
   #
   IF (CMAKE_BUILD_TYPE MATCHES "Debug")
-    LIST(APPEND DEAL_II_DEFINITIONS_DEBUG "TBB_USE_DEBUG" "TBB_DO_ASSERT=1")
-    LIST(APPEND DEAL_II_USER_DEFINITIONS_DEBUG "TBB_USE_DEBUG" "TBB_DO_ASSERT=1")
+    LIST(APPEND THREADS_DEFINITIONS_DEBUG "TBB_USE_DEBUG" "TBB_DO_ASSERT=1")
+    LIST(APPEND THREADS_USER_DEFINITIONS_DEBUG "TBB_USE_DEBUG" "TBB_DO_ASSERT=1")
   ENDIF()
 
   #
@@ -209,20 +205,22 @@ MACRO(FEATURE_THREADS_CONFIGURE_BUNDLED)
   IF( DEAL_II_WITH_CXX11 AND
       NOT DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE AND
       NOT CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
-    LIST(APPEND DEAL_II_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1")
-    LIST(APPEND DEAL_II_USER_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1")
+    LIST(APPEND THREADS_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1")
+    LIST(APPEND THREADS_USER_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1")
   ENDIF()
 
   #
   # tbb uses dlopen/dlclose, so link against libdl.so as well:
   #
+  # TODO: Also necessary for external lib, use preference toggle
+  #
   FIND_LIBRARY(dl_LIBRARY NAMES dl)
   MARK_AS_ADVANCED(dl_LIBRARY)
   IF(NOT dl_LIBRARY MATCHES "-NOTFOUND")
-    LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${dl_LIBRARY})
+    LIST(APPEND THREADS_LIBRARIES ${dl_LIBRARY})
   ENDIF()
 
-  INCLUDE_DIRECTORIES(${TBB_FOLDER}/include)
+  LIST(APPEND THREADS_BUNDLED_INCLUDE_DIRS ${TBB_FOLDER}/include)
 ENDMACRO()
 
 
index 1a49a2c7c2bebd8bbfcab618e94a2e14c98d4f18..739c7a62749372c5916b0f12c0b281ecc46eca24 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
index e04bbfac4149d743dda3b0c7822de52e26e45782..b7b000621152424734416a97fae8f5d233c80a4b 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -163,8 +163,8 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     IF(DEAL_II_WITH_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")
+        LIST(APPEND TRILINOS_DEFINITIONS "HAS_C99_TR1_CMATH")
+        LIST(APPEND TRILINOS_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 "
@@ -195,8 +195,7 @@ ENDMACRO()
 
 MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL)
 
-  SET(TRILINOS_ADD_TO_USER_INCLUDE_DIRS TRUE)
-  REGISTER_FEATURE(TRILINOS)
+  SET(TRILINOS_USER_INCLUDE_DIRS ${TRILINOS_INCLUDE_DIRS})
 
   SET(DEAL_II_EXPAND_TRILINOS_VECTOR "TrilinosWrappers::Vector")
   SET(DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR "TrilinosWrappers::BlockVector")
@@ -208,9 +207,9 @@ MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL)
   #
   # Disable a bunch of warnings caused by Trilinos headers:
   #
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused")
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-extra")
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-overloaded-virtual")
+  ENABLE_IF_SUPPORTED(TRILINOS_CXX_FLAGS "-Wno-unused")
+  ENABLE_IF_SUPPORTED(TRILINOS_CXX_FLAGS "-Wno-extra")
+  ENABLE_IF_SUPPORTED(TRILINOS_CXX_FLAGS "-Wno-overloaded-virtual")
 
 ENDMACRO()
 
index 56ac7e323d648fd83fe9671aa145903caaf85d05..f1d0d7451351799f7f7cbc0f28939af4730349b4 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -21,7 +21,7 @@
 SET(FEATURE_UMFPACK_DEPENDS DEAL_II_WITH_LAPACK)
 
 MACRO(FEATURE_UMFPACK_CONFIGURE_BUNDLED)
-  INCLUDE_DIRECTORIES(
+  SET(UMFPACK_BUNDLED_INCLUDE_DIRS
     ${UMFPACK_FOLDER}/UMFPACK/Include
     ${UMFPACK_FOLDER}/AMD/Include
     )
index 6ed8f62c24e4e592dabb81007dda802e0ecd4e4a..81cdd69e30149ae60a32cb0b57ea8f602969cf86 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -112,15 +112,13 @@ ENDMACRO()
 
 
 MACRO(FEATURE_PETSC_CONFIGURE_EXTERNAL)
-  INCLUDE_DIRECTORIES(${PETSC_INCLUDE_DIRS})
 
-  SET(PETSC_ADD_TO_USER_INCLUDE_DIRS TRUE)
-  REGISTER_FEATURE(PETSC)
+  SET(PETSC_USER_INCLUDE_DIRS ${PETSC_INCLUDE_DIRS})
 
   #
   # Disable a bunch of warnings when compiling with petsc:
   #
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-long-long")
+  ENABLE_IF_SUPPORTED(PETSC_CXX_FLAGS "-Wno-long-long")
 
   SET(DEAL_II_EXPAND_PETSC_VECTOR "PETScWrappers::Vector")
   SET(DEAL_II_EXPAND_PETSC_BLOCKVECTOR "PETScWrappers::BlockVector")
index de29304bbf61942974fbc691c55ba723f2359ffe..ec72b800a282ef096e56e0c65873c59386712718 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -105,19 +105,18 @@ MACRO(FEATURE_BOOST_FIND_EXTERNAL var)
 ENDMACRO()
 
 
-#
-# The user has to know the location of the boost headers as well:
-#
-SET(BOOST_ADD_TO_USER_INCLUDE_DIRS TRUE)
-
-
 MACRO(FEATURE_BOOST_CONFIGURE_BUNDLED)
-  INCLUDE_DIRECTORIES(${BOOST_FOLDER}/include)
+  SET(BOOST_BUNDLED_INCLUDE_DIRS ${BOOST_FOLDER}/include)
 ENDMACRO()
 
 
 CONFIGURE_FEATURE(BOOST)
 
+#
+# The user has to know the location of the boost headers as well:
+#
+SET(BOOST_USER_INCLUDE_DIRS ${BOOST_INCLUDE_DIRS})
+
 #
 # DEAL_II_WITH_BOOST is always required.
 #
index c9abde129dc68f5ff79d86f56c78e455c262ec16..4794106652ed52c33a7a13940b7704fe283e03bb 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -26,7 +26,7 @@ ENDMACRO()
 
 
 MACRO(FEATURE_FUNCTIONPARSER_CONFIGURE_BUNDLED)
-  INCLUDE_DIRECTORIES(${FUNCTIONPARSER_FOLDER})
+  SET(FUNCTIONPARSER_BUNDLED_INCLUDE_DIRS ${FUNCTIONPARSER_FOLDER})
 ENDMACRO()
 
 
index 81e71ceffa7bf9b83ce5166fd3c8abbe3c5288a7..5dd027d482929c502f76e73fcd242dd18d55b1ec 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -47,10 +47,10 @@ MACRO(FEATURE_HDF5_FIND_EXTERNAL var)
 ENDMACRO()
 
 
+CONFIGURE_FEATURE(HDF5)
+
+
 #
 # The user has to know the location of the hdf5 headers as well:
 #
-SET(HDF5_ADD_TO_USER_INCLUDE_DIRS TRUE)
-
-
-CONFIGURE_FEATURE(HDF5)
+SET(HDF5_USER_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS})
index 4022f98026856d9e501ce4a5827f408042cfec91..a02e94d0b97d6e5856ac254e580a622e494d74e3 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
 SET(FEATURE_MUMPS_DEPENDS DEAL_II_WITH_MPI DEAL_II_WITH_LAPACK)
 
 
+CONFIGURE_FEATURE(MUMPS)
+
 #
 # The user has to know the location of the MUMPS headers as well:
 #
-SET(MUMPS_ADD_TO_USER_INCLUDE_DIRS TRUE)
-
-
-CONFIGURE_FEATURE(MUMPS)
+SET(MUMPS_USER_INCLUDE_DIRS ${MUMPS_INCLUDE_DIRS})
index 4055c0f30cf494a5ca73e930b73fbec2fac8a737..a54643b60cd34f3566206f6d882e87037742e985 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -75,10 +75,9 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
 ENDMACRO()
 
 
+CONFIGURE_FEATURE(P4EST)
+
 #
 # The user has to know the location of the P4est headers as well:
 #
-SET(P4EST_ADD_TO_USER_INCLUDE_DIRS TRUE)
-
-
-CONFIGURE_FEATURE(P4EST)
+SET(P4EST_USER_INCLUDE_DIRS ${P4EST_INCLUDE_DIRS})
index fdb87649d01d34fe8a763dd928739d71e41df61c..a4b97958fc6323c706107c04a5171efad9035513 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -58,12 +58,6 @@ MACRO(FEATURE_SLEPC_FIND_EXTERNAL var)
 ENDMACRO()
 
 
-#
-# The user has to know the location of the SLEPC headers as well:
-#
-SET(SLEPC_ADD_TO_USER_INCLUDE_DIRS TRUE)
-
-
 MACRO(FEATURE_SLEPC_ERROR_MESSAGE)
   MESSAGE(FATAL_ERROR "\n"
     "Could not find the SLEPc library!\n"
@@ -84,3 +78,8 @@ ENDMACRO()
 
 
 CONFIGURE_FEATURE(SLEPC)
+
+#
+# The user has to know the location of the SLEPC headers as well:
+#
+SET(SLEPC_USER_INCLUDE_DIRS ${SLEPC_INCLUDE_DIRS})
index 240e2bfa0d8f5a215832fd1089c7f1eb5273f372..615ff71d3c93347ac724c4b7d6f5c5fa06f94ab6 100644 (file)
@@ -233,11 +233,10 @@ MACRO(CONFIGURE_FEATURE _feature)
 
           IF(COMMAND FEATURE_${_feature}_CONFIGURE_EXTERNAL)
             RUN_COMMAND("FEATURE_${_feature}_CONFIGURE_EXTERNAL()")
-          ELSE()
-            REGISTER_FEATURE(${_feature})
           ENDIF()
 
           MESSAGE(STATUS "DEAL_II_WITH_${_feature} successfully set up with external dependencies.")
+          LIST(APPEND DEAL_II_FEATURES ${_feature})
           SET(FEATURE_${_feature}_EXTERNAL_CONFIGURED TRUE)
           SET_CACHED_OPTION(${_feature} ON)
 
@@ -247,9 +246,12 @@ MACRO(CONFIGURE_FEATURE _feature)
 
           IF(FEATURE_${_feature}_HAVE_BUNDLED AND DEAL_II_ALLOW_BUNDLED)
             RUN_COMMAND("FEATURE_${_feature}_CONFIGURE_BUNDLED()")
+
             MESSAGE(STATUS "DEAL_II_WITH_${_feature} successfully set up with bundled packages.")
+            LIST(APPEND DEAL_II_FEATURES ${_feature})
             SET(FEATURE_${_feature}_BUNDLED_CONFIGURED TRUE)
             SET_CACHED_OPTION(${_feature} ON)
+
           ELSE()
             IF(DEAL_II_WITH_${_feature})
               IF(COMMAND FEATURE_${_feature}_ERROR_MESSAGE)
index 8efacf6dfe5b3c91c08a5348fd9ee1d8e244230c..19d4883aaeb4713583e1e5787c0aacd1f9e83862 100644 (file)
@@ -39,7 +39,7 @@ MACRO(DEAL_II_ADD_LIBRARY _library)
       )
 
     SET_TARGET_PROPERTIES(${_library}.${_build_lowercase} PROPERTIES
-      LINK_FLAGS "${DEAL_II_LINKER_FLAGS};${DEAL_II_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} ${DEAL_II_CXX_FLAGS_${_build}}"
       LINKER_LANGUAGE "CXX"
index 5c590280ee058f379a1cdd164a12271e7addf5ed..1f6ed329a0c612bae2f15972b3155174ee738ce2 100644 (file)
@@ -1,7 +1,7 @@
 ## ---------------------------------------------------------------------
 ## $Id$
 ##
-## Copyright (C) 2013 by the deal.II authors
+## Copyright (C) 2013 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -24,9 +24,9 @@
 #
 # This macro will add
 #
-#   <FEATURE>_LIBRARIES
-#   <FEATURE>_INCLUDE_DIRS(|_DEBUG|_RELEASE)
-#   <FEATURE>_USER_INCLUDE_DIRS(|_DEBUG|_RELEASE)
+#   <FEATURE>_LIBRARIES (respecting general, optimized, debug keyword)
+#   <FEATURE>_LIBRARIES(_DEBUG|_RELEASE)
+#   <FEATURE>_(|BUNDLED_|USER_)INCLUDE_DIRS
 #   <FEATURE>_DEFINITIONS(|_DEBUG|_RELEASE)
 #   <FEATURE>_USER_DEFINITIONS(|_DEBUG|_RELEASE)
 #   <FEATURE>_CXX_FLAGS(|_DEBUG|_RELEASE)
 # to the corresponding DEAL_II_* variables
 #
 
-
 MACRO(REGISTER_FEATURE _feature)
-  # variables for include directories:
-  FOREACH(_var ${_feature}_INCLUDE_DIRS ${_feature}_INCLUDE_PATH)
-    IF(DEFINED ${_var})
-      INCLUDE_DIRECTORIES(${${_var}})
-      IF(${_feature}_ADD_TO_USER_INCLUDE_DIRS)
-        LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${${_var}})
-      ENDIF()
-    ENDIF()
-  ENDFOREACH()
-
-  # variables for linker flags:
-  FOREACH(_var ${_feature}_LINKER_FLAGS ${_feature}_LINK_FLAGS)
-    IF(DEFINED ${_var})
-      ADD_FLAGS(DEAL_II_LINKER_FLAGS "${${_var}}")
-    ENDIF()
-  ENDFOREACH()
-
-  # variables for compiler flags:
-  FOREACH(_var ${_feature}_CXX_FLAGS ${_feature}_COMPILE_FLAGS)
-    IF(DEFINED ${_var})
-      ADD_FLAGS(DEAL_II_CXX_FLAGS "${${_var}}")
-    ENDIF()
-  ENDFOREACH()
 
   IF(DEFINED ${_feature}_LIBRARIES)
     #
     # Add ${_feature}_LIBRARIES to
-    #   DEAL_II_EXTERNAL_LIBRARIES
-    #   DEAL_II_EXTERNAL_LIBRARIES_DEBUG
-    #   DEAL_II_EXTERNAL_LIBRARIES_RELEASE
+    #   DEAL_II_LIBRARIES
+    #   DEAL_II_LIBRARIES_DEBUG
+    #   DEAL_II_LIBRARIES_RELEASE
     # depending on the "optmized", "debug" or "general" keyword
     #
     SET(_toggle "general")
@@ -77,14 +53,34 @@ MACRO(REGISTER_FEATURE _feature)
         SET(_toggle "${_tmp}")
       ELSE()
         IF("${_toggle}" STREQUAL "general")
-          LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${_tmp})
+          LIST(APPEND DEAL_II_LIBRARIES ${_tmp})
         ELSEIF("${_toggle}" STREQUAL "debug")
-          LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG ${_tmp})
+          LIST(APPEND DEAL_II_LIBRARIES_DEBUG ${_tmp})
         ELSEIF("${_toggle}" STREQUAL "optimized")
-          LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_RELEASE ${_tmp})
+          LIST(APPEND DEAL_II_LIBRARIES_RELEASE ${_tmp})
         ENDIF()
       ENDIF()
     ENDFOREACH()
   ENDIF()
 
+  FOREACH(_var
+    LIBRARIES_DEBUG LIBRARIES_RELEASE
+    INCLUDE_DIRS BUNDLED_INCLUDE_DIRS USER_INCLUDE_DIRS
+    DEFINITIONS DEFINITIONS_DEBUG DEFINITIONS_RELEASE
+    USER_DEFINITIONS USER_DEFINITIONS_DEBUG USER_DEFINITIONS_RELEASE
+    )
+    IF(DEFINED ${_feature}_${_var})
+      LIST(APPEND DEAL_II_${_var} ${${_feature}_${_var}})
+    ENDIF()
+  ENDFOREACH()
+
+  FOREACH(_var
+    CXX_FLAGS CXX_FLAGS_DEBUG CXX_FLAGS_RELEASE
+    LINKER_FLAGS LINKER_FLAGS_DEBUG LINKER_FLAGS_RELEASE
+    )
+    IF(DEFINED ${_feature}_${_var})
+      ADD_FLAGS(DEAL_II_${_var} "${${_feature}_${_var}}")
+    ENDIF()
+  ENDFOREACH()
+
 ENDMACRO()
index 4baa99b615ce32d0fb6ea961ca692a2f566937d3..92ed551db2d4b47bb860ae0113e3d82a0b5d2eb2 100644 (file)
@@ -52,18 +52,47 @@ FOREACH(_flag ${DEAL_II_REMOVED_FLAGS})
 ENDFOREACH()
 
 #
-# Deduplicate entries in DEAL_II_USER_INCLUDE_DIRS
+# Deduplicate entries in *_INCLUDE_DIRS and *_LIBRARIES
 #
-REMOVE_DUPLICATES(DEAL_II_USER_INCLUDE_DIRS)
+FOREACH(_feature DEAL_II ${DEAL_II_FEATURES})
+  FOREACH(_suffix INCLUDE_DIRS USER_INCLUDE_DIRS BUNDLED_INCLUDE_DIRS)
+    REMOVE_DUPLICATES(${_feature}_${_suffix})
+  ENDFOREACH()
+  FOREACH(_suffix LIBRARIES LIBRARIES_RELEASE LIBRARIES_DEBUG)
+    REMOVE_DUPLICATES(${_feature}_${_suffix} REVERSE)
+  ENDFOREACH()
+ENDFOREACH()
 
 #
-# Deduplicate entries in DEAL_II_EXTERNAL_LIBRARIES(_...)
-# in reverse order:
+# Save base configuration into variables BASE_* for later use in
+# setup_write_config.cmake:
 #
-REMOVE_DUPLICATES(DEAL_II_EXTERNAL_LIBRARIES REVERSE)
+FOREACH(_suffix
+  CXX_FLAGS CXX_FLAGS_RELEASE CXX_FLAGS_DEBUG
+  DEFINITIONS DEFINITIONS_RELEASE DEFINITIONS_DEBUG
+  USER_DEFINITIONS USER_DEFINITIONS_RELEASE USER_DEFINITIONS_DEBUG
+  LINKER_FLAGS LINKER_FLAGS_RELEASE LINKER_FLAGS_DEBUG
+  INCLUDE_DIRS USER_INCLUDE_DIRS BUNDLED_INCLUDE_DIRS
+  LIBRARIES LIBRARIES_RELEASE LIBRARIES_DEBUG
+  )
+  SET(BASE_${_suffix} ${DEAL_II_${_suffix}})
+ENDFOREACH()
 
-FOREACH(_build ${DEAL_II_BUILD_TYPES})
-  REMOVE_DUPLICATES(DEAL_II_EXTERNAL_LIBRARIES_${_build} REVERSE)
+#
+# Register features:
+#
+FOREACH(_feature ${DEAL_II_FEATURES})
+  REGISTER_FEATURE(${_feature})
+ENDFOREACH()
+
+#
+# Deduplicate entries one more time :-]
+#
+FOREACH(_suffix INCLUDE_DIRS USER_INCLUDE_DIRS BUNDLED_INCLUDE_DIRS)
+  REMOVE_DUPLICATES(DEAL_II_${_suffix})
+ENDFOREACH()
+FOREACH(_suffix LIBRARIES LIBRARIES_RELEASE LIBRARIES_DEBUG)
+  REMOVE_DUPLICATES(DEAL_II_${_suffix} REVERSE)
 ENDFOREACH()
 
 #
@@ -78,10 +107,6 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES})
     ${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:
index f3062a3907d2013bef518e9ed44ccc5ab2a7eee2..ab2354063140d7255eff6dbf339f3c48927769a8 100644 (file)
@@ -76,31 +76,51 @@ ENDIF()
 _both("#\n")
 
 _detailed(
-"#  Compiler flags used for this build:
-#        DEAL_II_CXX_FLAGS:            ${DEAL_II_CXX_FLAGS}
+"#  Base configuration (prior to feature configuration):
+#        DEAL_II_CXX_FLAGS:            ${BASE_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:    ${BASE_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:      ${BASE_CXX_FLAGS_DEBUG}\n")
 ENDIF()
 
-_detailed("#        DEAL_II_LINKER_FLAGS:         ${DEAL_II_LINKER_FLAGS}\n")
+_detailed("#        DEAL_II_LINKER_FLAGS:         ${BASE_LINKER_FLAGS}\n")
 IF(CMAKE_BUILD_TYPE MATCHES "Release")
-  _detailed("#        DEAL_II_LINKER_FLAGS_RELEASE: ${DEAL_II_LINKER_FLAGS_RELEASE}\n")
+  _detailed("#        DEAL_II_LINKER_FLAGS_RELEASE: ${BASE_LINKER_FLAGS_RELEASE}\n")
 ENDIF()
 IF(CMAKE_BUILD_TYPE MATCHES "Debug")
-  _detailed("#        DEAL_II_LINKER_FLAGS_DEBUG:   ${DEAL_II_LINKER_FLAGS_DEBUG}\n")
+  _detailed("#        DEAL_II_LINKER_FLAGS_DEBUG:   ${BASE_LINKER_FLAGS_DEBUG}\n")
 ENDIF()
 
-_detailed("#        DEAL_II_DEFINITIONS:          ${DEAL_II_DEFINITIONS}\n")
+_detailed("#        DEAL_II_DEFINITIONS:          ${BASE_DEFINITIONS}\n")
 IF(CMAKE_BUILD_TYPE MATCHES "Release")
-  _detailed("#        DEAL_II_DEFINITIONS_RELEASE:  ${DEAL_II_DEFINITIONS_RELEASE}\n")
+  _detailed("#        DEAL_II_DEFINITIONS_RELEASE:  ${BASE_DEFINITIONS_RELEASE}\n")
 ENDIF()
 IF(CMAKE_BUILD_TYPE MATCHES "Debug")
-  _detailed("#        DEAL_II_DEFINITIONS_DEBUG:    ${DEAL_II_DEFINITIONS_DEBUG}\n")
+  _detailed("#        DEAL_II_DEFINITIONS_DEBUG:    ${BASE_DEFINITIONS_DEBUG}\n")
+ENDIF()
+
+_detailed("#        DEAL_II_USER_DEFINITIONS:     ${BASE_DEFINITIONS}\n")
+IF(CMAKE_BUILD_TYPE MATCHES "Release")
+  _detailed("#        DEAL_II_USER_DEFINITIONS_REL: ${BASE_DEFINITIONS_RELEASE}\n")
+ENDIF()
+IF(CMAKE_BUILD_TYPE MATCHES "Debug")
+  _detailed("#        DEAL_II_USER_DEFINITIONS_DEB: ${BASE_DEFINITIONS_DEBUG}\n")
+ENDIF()
+
+_detailed("#        DEAL_II_INCLUDE_DIRS          ${BASE_INCLUDE_DIRS}\n")
+_detailed("#        DEAL_II_USER_INCLUDE_DIRS:    ${BASE_USER_INCLUDE_DIRS}\n")
+_detailed("#        DEAL_II_BUNDLED_INCLUDE_DIRS: ${BASE_BUNDLED_INCLUDE_DIRS}\n")
+
+_detailed("#        DEAL_II_LIBRARIES:            ${BASE_LIBRARIES}\n")
+IF(CMAKE_BUILD_TYPE MATCHES "Release")
+  _detailed("#        DEAL_II_LIBRARIES_RELEASE:    ${BASE_LIBRARIES_RELEASE}\n")
+ENDIF()
+IF(CMAKE_BUILD_TYPE MATCHES "Debug")
+  _detailed("#        DEAL_II_LIBRARIES_DEBUG:      ${BASE_LIBRARIES_DEBUG}\n")
 ENDIF()
 
 _detailed("#\n")
@@ -134,50 +154,14 @@ ENDFOREACH()
 
 FOREACH(_var ${_features})
   IF(${${_var}})
-    # FEATURE is enabled
+
+    #
+    # The feature is enabled:
+    #
     STRING(REGEX REPLACE "^DEAL_II_WITH_" "" _feature ${_var})
     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()
-
-      #
-      # Special version numbers:
-      #
-      IF(_feature MATCHES "THREADS" AND DEFINED TBB_VERSION)
-        _detailed("#            TBB_VERSION = ${TBB_VERSION}\n")
-      ENDIF()
-      IF(_feature MATCHES "MPI" AND DEFINED OMPI_VERSION)
-        _detailed("#            OMPI_VERSION = ${OMPI_VERSION}\n")
-      ENDIF()
-
-      #
-      # Print out ${_feature}_DIR:
-      #
-      IF(NOT "${${_feature}_DIR}" STREQUAL "")
-        _detailed("#            ${_feature}_DIR = ${${_feature}_DIR}\n")
-      ENDIF()
-
-      #
-      # Print the feature configuration:
-      #
-      FOREACH(_var2
-          CXX_COMPILER C_COMPILER Fortran_COMPILER LIBRARIES INCLUDE_DIRS
-          USER_INCLUDE_DIRS DEFINITIONS USER_DEFINITIONS CXX_FLAGS
-          LINKER_FLAGS
-        )
-        IF(DEFINED ${_feature}_${_var2})
-          _detailed("#            ${_feature}_${_var2} = ${${_feature}_${_var2}}\n")
-        ENDIF()
-      ENDFOREACH()
-
     ELSEIF(FEATURE_${_feature}_BUNDLED_CONFIGURED)
-
       IF(DEAL_II_FORCE_BUNDLED_${_feature})
         _both("#        ${_var} set up with bundled packages (forced)\n")
       ELSE()
@@ -186,6 +170,47 @@ FOREACH(_var ${_features})
     ELSE()
      _both("#        ${_var} = ${${_var}}\n")
     ENDIF()
+
+    #
+    # Print out version number:
+    #
+    IF(DEFINED ${_feature}_VERSION)
+      _detailed("#            ${_feature}_VERSION = ${${_feature}_VERSION}\n")
+    ENDIF()
+
+    #
+    # Special version numbers:
+    #
+    IF(_feature MATCHES "THREADS" AND DEFINED TBB_VERSION)
+      _detailed("#            TBB_VERSION = ${TBB_VERSION}\n")
+    ENDIF()
+    IF(_feature MATCHES "MPI" AND DEFINED OMPI_VERSION)
+      _detailed("#            OMPI_VERSION = ${OMPI_VERSION}\n")
+    ENDIF()
+
+    #
+    # Print out ${_feature}_DIR:
+    #
+    IF(NOT "${${_feature}_DIR}" STREQUAL "")
+      _detailed("#            ${_feature}_DIR = ${${_feature}_DIR}\n")
+    ENDIF()
+
+    #
+    # Print the feature configuration:
+    #
+    FOREACH(_var2
+        C_COMPILER CXX_COMPILER Fortran_COMPILER
+        CXX_FLAGS CXX_FLAGS_RELEASE CXX_FLAGS_DEBUG
+        DEFINITIONS DEFINITIONS_RELEASE DEFINITIONS_DEBUG
+        USER_DEFINITIONS USER_DEFINITIONS_RELEASE USER_DEFINITIONS_DEBUG
+        LINKER_FLAGS LINKER_FLAGS_RELEASE LINKER_FLAGS_DEBUG
+        INCLUDE_DIRS USER_INCLUDE_DIRS BUNDLED_INCLUDE_DIRS
+        LIBRARIES LIBRARIES_RELEASE LIBRARIES_DEBUG
+      )
+      IF(DEFINED ${_feature}_${_var2})
+        _detailed("#            ${_feature}_${_var2} = ${${_feature}_${_var2}}\n")
+      ENDIF()
+    ENDFOREACH()
   ELSE()
     # FEATURE is disabled
     _both("#      ( ${_var} = ${${_var}} )\n")
index 3517b168bb8868ad7903d2a031a4a847f62aba40..48146dc0c2f60dda763d62427389d3f8f7570ca3 100644 (file)
@@ -343,18 +343,19 @@ RESET_CMAKE_REQUIRED()
       <code>FATAL_ERROR</code> must be avoided (the only exception is
       the <code>REQUIRED</code> keyword).
     <li>
-      If successful, the following uncached variables might be set:
-
+      If the feature is successfully found, a subset of the following
+      <b>uncached</b> variables might be set:
 <pre>
 FEATURE_FOUND
-FEATURE_LIBRARIES
+FEATURE_LIBRARIES (with optimized, debug, release keywords)
+FEATURE_LIBRARIES(_DEBUG|_RELEASE)
 FEATURE_INCLUDE_DIRS
-FEATURE_LINKER_FLAGS
+FEATURE_LINKER_FLAGS(|_DEBUG|_RELEASE)
+FEATURE_CXX_FLAGS(|_DEBUG|_RELEASE)
+FEATURE_DEFINITIONS(|_DEBUG|_RELEASE)
 
 FEATURE_VERSION
-FEATURE_VERSION_MAJOR
-FEATURE_VERSION_MINOR
-FEATURE_VERSION_SUBMINOR
+FEATURE_VERSION(_MAJOR|_MINOR|_SUBMINOR)
 </pre>
 
 There are obviously valid exceptions from this rule, though.
@@ -363,6 +364,11 @@ There are obviously valid exceptions from this rule, though.
       "global" variables prefixed by <code>FEATURE_</code> may be
       altered. Do not set <code>DEAL_II_*</code> or <code>CMAKE_*</code>
       variables directly!
+
+    <li>
+      The find module must define a macro <code>FEATURE_CLEAR</code> that
+      unsets all cached variables, so that a subsequent call to the find
+      module starts a completely fresh features search.
     <li>
       A hint with <code>FEATURE_DIR</code> can be set up for
       convenience. It is best to start the <code>Find</code> module by
@@ -400,11 +406,15 @@ SET(FEATURE_DIR "" CACHE PATH "An optional hint to a FEATURE directory")
   module is used to determine whether an external dependency can be
   resolved or not. Depending on the current state of
   <code>DEAL_II_WITH_&lt;FEATURE&gt;</code> (see
-  <a href="../users/cmake.html#configurefeature">here</a>) the variables
+  <a href="../users/cmake.html#configurefeature">here</a>) the
+  configuration variables
 <pre>
 FEATURE_LIBRARIES
-FEATURE_INCLUDE_DIRS
-FEATURE_LINKER_FLAGS
+FEATURE_LIBRARIES(|_DEBUG|_RELEASE)
+FEATURE_(|USER_|BUNDLED_)INCLUDE_DIRS
+FEATURE_LINKER_FLAGS(|_DEBUG|_RELEASE)
+FEATURE_CXX_FLAGS(|_DEBUG|_RELEASE)
+FEATURE_DEFINITIONS(|_DEBUG|_RELEASE)
 </pre>
   are appended to the set of <a href="#variables">global variables</a>
   and <code>DEAL_II_WITH_&lt;FEATURE&gt;</code> is set to
@@ -458,7 +468,7 @@ FEATURE_&lt;FEATURE&gt;_ERROR_MESSAGE()      (macro)
 </pre>
 
     <li>
-      In <code>./bundled/CMakeLists.txt</code>:
+      In <code>./bundled/configure_bundled.cmake</code>:
 <pre>
 FEATURE_&lt;FEATURE&gt;_HAVE_BUNDLED         (a boolean)
   - which should either be set to TRUE if all necessary libraries of the
@@ -492,6 +502,15 @@ DEAL_II_FORCE_BUNDLED_&lt;FEATURE&gt;        (an option)
   <code>LIST(APPEND ...)</code>, flags with <code>ADD_FLAGS(...)</code>
   (or if it is necessary to guard them with
   <code>ENABLE_IF_SUPPORTED(...)</code>.)
+</p>
+<p>
+  <b>Feature configuration must not be added directly to this variables but
+    to corresponding <code>&lt;FEATURE&gt;_*</code> variables, instead.
+  Feature configuration variables get appended to the below list of global
+  configuration variables automatically.</b>
+</p>
+
+
   <ul>
     <li>
       The general (internal) logic for variables applies:
@@ -503,27 +522,32 @@ DEAL_II_FORCE_BUNDLED_&lt;FEATURE&gt;        (an option)
       </ul>
 
     <li>
-      For internal use, for setting necessary linker flags for the deal.II library:
+      For internal and external use, used to keep track of external
+      libraries, the <acronym>deal.II</acronym> library and user
+      programs have to be linked against:
       <ul>
-        <li> <code>DEAL_II_LINKER_FLAGS</code>
-        <li> <code>DEAL_II_LINKER_FLAGS_DEBUG</code>
-        <li> <code>DEAL_II_LINKER_FLAGS_RELEASE</code>
+        <li> <code>DEAL_II_LIBRARIES</code>
+        <li> <code>DEAL_II_LIBRARIES_DEBUG</code>
+        <li> <code>DEAL_II_LIBRARIES_RELEASE</code>
       </ul>
 
     <li>
-      For internal use, for setting necessary compiler flags, e.g.
-      <code>-std=c++11</code> (if available):
+      For internal use, for setting necessary include dirs for the compilation of the
+      <acronym>deal.II</acronym> library:
       <ul>
-        <li> <code>DEAL_II_CXX_FLAGS</code>
-        <li> <code>DEAL_II_CXX_FLAGS_DEBUG</code>
-        <li> <code>DEAL_II_CXX_FLAGS_RELEASE</code>
+        <li> <code>DEAL_II_INCLUDE_DIRS</code>
       </ul>
-
     <li>
-      For internal use, for setting necessary include dirs for the compilation of the
-      <acronym>deal.II</acronym> library:
+      Used to keep track of external include dirs, necessary for the
+      compilation of user programs:
       <ul>
-        <li> <code>INCLUDE_DIRECTORIES(...)</code>
+        <li> <code>DEAL_II_USER_INCLUDE_DIRS</code>
+      </ul>
+    <li>
+      Include dirs from bundled packages necessary for the compilation fo
+      the library and user projects out of the build directory:
+      <ul>
+        <li> <code>DEAL_II_BUNDLED_INCLUDE_DIRS</code>
       </ul>
 
     <li>
@@ -535,17 +559,6 @@ DEAL_II_FORCE_BUNDLED_&lt;FEATURE&gt;        (an option)
         <li> <code>DEAL_II_DEFINITIONS_DEBUG</code>
         <li> <code>DEAL_II_DEFINITIONS_RELEASE</code>
       </ul>
-
-    <li>
-      For internal and external use, used to keep track of external
-      libraries, the <acronym>deal.II</acronym> library and user
-      programs have to be linked against:
-      <ul>
-        <li> <code>DEAL_II_EXTERNAL_LIBRARIES</code>
-        <li> <code>DEAL_II_EXTERNAL_LIBRARIES_DEBUG</code>
-        <li> <code>DEAL_II_EXTERNAL_LIBRARIES_RELEASE</code>
-      </ul>
-
     <li>
       For external use, used to keep track of external preprocessor
       definitions, necessary for the compilation of user programs:
@@ -556,11 +569,22 @@ DEAL_II_FORCE_BUNDLED_&lt;FEATURE&gt;        (an option)
       </ul>
 
     <li>
-      Used to keep track of external include dirs, necessary for the
-      compilation of user programs:
+      For internal and external use, for setting necessary compiler flags,
+      e.g. <code>-std=c++11</code> (if available):
       <ul>
-        <li> <code>DEAL_II_USER_INCLUDE_DIRS</code>
+        <li> <code>DEAL_II_CXX_FLAGS</code>
+        <li> <code>DEAL_II_CXX_FLAGS_DEBUG</code>
+        <li> <code>DEAL_II_CXX_FLAGS_RELEASE</code>
       </ul>
+
+    <li>
+      For internal use, for setting necessary linker flags for the deal.II library:
+      <ul>
+        <li> <code>DEAL_II_LINKER_FLAGS</code>
+        <li> <code>DEAL_II_LINKER_FLAGS_DEBUG</code>
+        <li> <code>DEAL_II_LINKER_FLAGS_RELEASE</code>
+      </ul>
+
   </ul>
 </p>
 
index 384bfde3a7f22a7883fb14642c92d5a3f4d94010..a083239b46b6a35cf3d51c2fac7420e771d92546 100644 (file)
@@ -124,6 +124,13 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+  <li>Reworked: External feature setup. Disabling a feature now cleans up
+  associated internal, cached variables. A per-feature linkage test now spots
+  common linking inconsistencies early in the configuration stage (and not
+  just after a complete compilation).
+  <br>
+  (Matthias Maier, 2014/02/01)
+
   <li>New/fixed: The ParameterHandler::print_parameters_section
   method not worked for XML output. There is now a flag
   include_top_level_elements which prints all higher
index 0525ca1b93fe12d9fd96380daa96de61e2ad12b5..e16c106d464ce556cae1e2c413635d5e64e19626 100644 (file)
@@ -21,12 +21,10 @@ MESSAGE(STATUS "Setting up library")
 #
 
 INCLUDE_DIRECTORIES(
-  BEFORE # Ensure deal.II include directories come first
-  #
-  # Reverse order due to BEFORE:
-  #
-  ${CMAKE_SOURCE_DIR}/include/
   ${CMAKE_BINARY_DIR}/include/
+  ${CMAKE_SOURCE_DIR}/include/
+  ${DEAL_II_BUNDLED_INCLUDE_DIRS}
+  ${DEAL_II_INCLUDE_DIRS}
   )
 
 #
@@ -86,8 +84,8 @@ FOREACH(build ${DEAL_II_BUILD_TYPES})
     )
 
   TARGET_LINK_LIBRARIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
-    ${DEAL_II_EXTERNAL_LIBRARIES_${build}}
-    ${DEAL_II_EXTERNAL_LIBRARIES}
+    ${DEAL_II_LIBRARIES_${build}}
+    ${DEAL_II_LIBRARIES}
     )
 
   FILE(MAKE_DIRECTORY

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.