]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Final cleanup of the build system for the release.
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Dec 2013 17:45:43 +0000 (17:45 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Dec 2013 17:45:43 +0000 (17:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@31861 0785d39b-7218-0410-832d-ea1e28bc413d

12 files changed:
deal.II/CMakeLists.txt
deal.II/bundled/CMakeLists.txt
deal.II/bundled/setup_bundled.cmake [new file with mode: 0644]
deal.II/cmake/config/CMakeLists.txt
deal.II/cmake/scripts/CMakeLists.txt
deal.II/contrib/CMakeLists.txt
deal.II/contrib/mesh_conversion/CMakeLists.txt
deal.II/contrib/parameter_gui/CMakeLists.txt
deal.II/doc/CMakeLists.txt
deal.II/doc/news/changes.h
deal.II/examples/CMakeLists.txt
deal.II/source/CMakeLists.txt

index 4caaebe4c88b007a0a9a93aa5b0c57b26b5b8168..8ae7818a1ec40499394a2d8c6da1fe21e27fcbab 100644 (file)
@@ -88,7 +88,13 @@ INCLUDE(setup_compiler_flags)
 # Include information about bundled libraries:
 #
 IF(DEAL_II_HAVE_BUNDLED_DIRECTORY)
-  INCLUDE(bundled/CMakeLists.txt)
+  FILE(GLOB _check_files "bundled/*.cmake")
+  LIST(SORT _check_files)
+  FOREACH(_file ${_check_files})
+    MESSAGE(STATUS "")
+    MESSAGE(STATUS "Include ${_file}")
+    INCLUDE(${_file})
+  ENDFOREACH()
 ENDIF()
 
 #
index ff7abbe9212fda5bf02750b5c39055b7800d5639..30e62c7d3fb2de8aad6b8f7b3c9b5d49d778ce31 100644 (file)
 ## ---------------------------------------------------------------------
 
 #
-# Export information about bundled library locations and do the actual
-# setup of compilation targets and installation here:
+# Compile and install enabled bundled features:
 #
 
+MESSAGE(STATUS "Setup bundled features")
 
-#
-# Boost C++ libraries
-#
-SET(FEATURE_BOOST_HAVE_BUNDLED TRUE)
-OPTION(DEAL_II_FORCE_BUNDLED_BOOST
-  "Always use the bundled boost library instead of an external one."
-  OFF)
-SET(BOOST_FOLDER "${CMAKE_SOURCE_DIR}/bundled/boost-1.49.0")
 
 IF(FEATURE_BOOST_BUNDLED_CONFIGURED)
   INSTALL(DIRECTORY ${BOOST_FOLDER}/include/boost
@@ -35,13 +27,14 @@ IF(FEATURE_BOOST_BUNDLED_CONFIGURED)
     COMPONENT library
     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_THREADS AND NOT DEAL_II_USE_CXX11)
+  IF(DEAL_II_WITH_THREADS AND NOT DEAL_II_USE_CXX11)
     #
     # If the C++ compiler doesn't completely support the C++11 standard
     # (and consequently we can't use std::thread, std::mutex, etc), then
@@ -54,36 +47,11 @@ IF(FEATURE_BOOST_BUNDLED_CONFIGURED)
 ENDIF()
 
 
-#
-# FunctionParser project:
-#
-SET(FEATURE_FUNCTIONPARSER_HAVE_BUNDLED TRUE)
-OPTION(DEAL_II_FORCE_BUNDLED_FUNCTIONPARSER
-  "Always use the bundled functionparser library instead of an external one."
-  OFF)
-SET(FUNCTIONPARSER_FOLDER "${CMAKE_SOURCE_DIR}/bundled/functionparser/")
-
 IF(FEATURE_FUNCTIONPARSER_BUNDLED_CONFIGURED)
   ADD_SUBDIRECTORY(${FUNCTIONPARSER_FOLDER})
 ENDIF()
 
 
-#
-# Threading Building Blocks library
-#
-IF(NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN"
-   AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
-  #
-  # Cygwin is unsupported by tbb, Windows due to the way we compile tbb...
-  #
-  SET(FEATURE_THREADS_HAVE_BUNDLED TRUE)
-  OPTION(DEAL_II_FORCE_BUNDLED_THREADS
-    "Always use the bundled tbb library instead of an external one."
-    OFF)
-  SET(TBB_FOLDER "${CMAKE_SOURCE_DIR}/bundled/tbb41_20130401oss")
-ENDIF()
-
-
 IF(FEATURE_THREADS_BUNDLED_CONFIGURED)
   INSTALL(DIRECTORY ${TBB_FOLDER}/include/tbb
     DESTINATION ${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled
@@ -91,6 +59,7 @@ IF(FEATURE_THREADS_BUNDLED_CONFIGURED)
     FILES_MATCHING PATTERN "*.h"
     PATTERN ".svn" EXCLUDE
     )
+
   FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_source_includes
     "${TBB_FOLDER}/include\n"
     )
@@ -99,25 +68,10 @@ IF(FEATURE_THREADS_BUNDLED_CONFIGURED)
 ENDIF()
 
 
-#
-# UMFPACK, AMD and UFCONFIG:
-#
-SET(FEATURE_UMFPACK_HAVE_BUNDLED TRUE)
-SET(UMFPACK_FOLDER "${CMAKE_SOURCE_DIR}/bundled/umfpack")
-OPTION(DEAL_II_FORCE_BUNDLED_UMFPACK
-  "Always use the bundled umfpack library instead of an external one."
-  OFF)
-
-#
-# Resolve a cache invalidation problem by searching for these flags
-# unconditionally. They're used for compiling the sources in
-# ${UMFPACK_FOLDER}/UMFPACK/Source depending on cached variables.
-#
-ENABLE_IF_SUPPORTED(_dummy "-Wno-sign-compare")
-ENABLE_IF_SUPPORTED(_dummy "-Wno-write-strings")
-
 IF(FEATURE_UMFPACK_BUNDLED_CONFIGURED)
   ADD_SUBDIRECTORY(${UMFPACK_FOLDER}/UMFPACK/Source)
   ADD_SUBDIRECTORY(${UMFPACK_FOLDER}/AMD/Source)
 ENDIF()
 
+
+MESSAGE(STATUS "Setup bundled features - Done")
diff --git a/deal.II/bundled/setup_bundled.cmake b/deal.II/bundled/setup_bundled.cmake
new file mode 100644 (file)
index 0000000..42e1a59
--- /dev/null
@@ -0,0 +1,74 @@
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2013 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+#
+# Export information about bundled library locations and do the actual
+# setup of compilation targets and installation here:
+#
+
+#
+# Boost C++ libraries
+#
+
+SET(FEATURE_BOOST_HAVE_BUNDLED TRUE)
+
+OPTION(DEAL_II_FORCE_BUNDLED_BOOST
+  "Always use the bundled boost library instead of an external one."
+  OFF)
+
+SET(BOOST_FOLDER "${CMAKE_SOURCE_DIR}/bundled/boost-1.49.0")
+
+#
+# FunctionParser project:
+#
+
+SET(FEATURE_FUNCTIONPARSER_HAVE_BUNDLED TRUE)
+
+OPTION(DEAL_II_FORCE_BUNDLED_FUNCTIONPARSER
+  "Always use the bundled functionparser library instead of an external one."
+  OFF)
+
+SET(FUNCTIONPARSER_FOLDER "${CMAKE_SOURCE_DIR}/bundled/functionparser/")
+
+#
+# Threading Building Blocks library
+#
+
+IF( NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN"
+    AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows" )
+  #
+  # Cygwin is unsupported by tbb, Windows due to the way we compile tbb...
+  #
+  SET(FEATURE_THREADS_HAVE_BUNDLED TRUE)
+
+  OPTION(DEAL_II_FORCE_BUNDLED_THREADS
+    "Always use the bundled tbb library instead of an external one."
+    OFF)
+
+  SET(TBB_FOLDER "${CMAKE_SOURCE_DIR}/bundled/tbb41_20130401oss")
+ENDIF()
+
+#
+# UMFPACK, AMD and UFCONFIG:
+#
+
+SET(FEATURE_UMFPACK_HAVE_BUNDLED TRUE)
+
+OPTION(DEAL_II_FORCE_BUNDLED_UMFPACK
+  "Always use the bundled umfpack library instead of an external one."
+  OFF)
+
+SET(UMFPACK_FOLDER "${CMAKE_SOURCE_DIR}/bundled/umfpack")
index d6b3bb2a8920fc1ee6d02327521deb0b3a78309d..e499bafbee8040488bd14876e0194efcaa958fec 100644 (file)
@@ -26,6 +26,8 @@
 # two distinct set ups.
 #
 
+MESSAGE(STATUS "Setup project configuration")
+
 #
 # Read in auxiliary include directories for the build directory
 # configuration:
@@ -377,3 +379,5 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
     COMPONENT compat_files
     )
 ENDIF()
+
+MESSAGE(STATUS "Setup project configuration - Done")
index 55aae26c1aecb34c9f6df4aebc2e6827d22f8e90..8c38f883de80bff00167df7dce7ca72e47043424 100644 (file)
@@ -20,6 +20,8 @@ SET_TARGET_PROPERTIES(expand_instantiations_exe
   )
 
 IF(DEAL_II_COMPONENT_COMPAT_FILES)
+  MESSAGE(STATUS "Setup compat_files")
+
   #
   # Also build and install the old dependency_resolution executable:
   #
@@ -38,4 +40,5 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
     DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts
     COMPONENT compat_files
     )
+  MESSAGE(STATUS "Setup compat_files - Done")
 ENDIF()
index 6e92950efaaebe5631c5d8101b9ae9e93cd83c36..0be39e772a35adcbb132709b7f1410b94fe6f153 100644 (file)
 ## ---------------------------------------------------------------------
 
 IF(DEAL_II_COMPONENT_MESH_CONVERTER)
+  MESSAGE(STATUS "Setup mesh_converter")
   ADD_SUBDIRECTORY(mesh_conversion)
+  MESSAGE(STATUS "Setup mesh_converter - Done")
 ENDIF()
 
 IF(DEAL_II_COMPONENT_PARAMETER_GUI)
+  MESSAGE(STATUS "Setup parameter_gui")
   ADD_SUBDIRECTORY(parameter_gui)
+  MESSAGE(STATUS "Setup parameter_gui - Done")
 ENDIF()
 
index 387797f3e1183405d00c6cab980b810c2aac16fd..ba3190a52d3accc7c0e197b3e5e0c2e5210b9c20 100644 (file)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
 #PROJECT(mesh_converter)
 
+IF("${DEAL_II_EXECUTABLE_RELDIR}" STREQUAL "")
+  SET(DEAL_II_EXECUTABLE_RELDIR "bin")
+ENDIF()
+
 ADD_EXECUTABLE(mesh_converter_exe
   Main.cc
   MeshConversion.cc
   )
 SET_TARGET_PROPERTIES(mesh_converter_exe
-  PROPERTIES OUTPUT_NAME mesh_converter
+  PROPERTIES
+  OUTPUT_NAME mesh_converter
+  RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_EXECUTABLE_RELDIR}"
   )
 
 ADD_DEPENDENCIES(mesh_converter mesh_converter_exe)
 
-IF("${DEAL_II_EXECUTABLE_RELDIR}" STREQUAL "")
-  SET(DEAL_II_EXECUTABLE_RELDIR "bin")
-ENDIF()
-
 INSTALL(TARGETS mesh_converter_exe
   RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
   COMPONENT mesh_converter
   )
-EXPORT(TARGETS mesh_converter_exe
-  FILE
-  ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake
-  APPEND
-  )
index b0350b59e01968edbc1fd943ba85b32572986ce1..cebf057f950e67b699736fd77c653f07d919634e 100644 (file)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
 #PROJECT(parameter_gui)
 
+IF("${DEAL_II_EXECUTABLE_RELDIR}" STREQUAL "")
+  SET(DEAL_II_EXECUTABLE_RELDIR "bin")
+ENDIF()
+
 FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtXml)
 MARK_AS_ADVANCED(QT_QMAKE_EXECUTABLE)
 
@@ -46,21 +50,16 @@ ADD_EXECUTABLE(parameter_gui_exe
   ${SOURCE_MOC}
   ${SOURCE_RCC}
   )
-SET_TARGET_PROPERTIES(parameter_gui_exe PROPERTIES OUTPUT_NAME parameter_gui)
+SET_TARGET_PROPERTIES(parameter_gui_exe
+  PROPERTIES
+  OUTPUT_NAME parameter_gui
+  RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_EXECUTABLE_RELDIR}"
+  )
 TARGET_LINK_LIBRARIES(parameter_gui_exe ${QT_LIBRARIES})
 
 ADD_DEPENDENCIES(parameter_gui parameter_gui_exe)
 
-IF("${DEAL_II_EXECUTABLE_RELDIR}" STREQUAL "")
-  SET(DEAL_II_EXECUTABLE_RELDIR "bin")
-ENDIF()
-
 INSTALL(TARGETS parameter_gui_exe
   RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
   COMPONENT parameter_gui
   )
-EXPORT(TARGETS parameter_gui_exe
-  FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake
-  APPEND
-  )
-
index ff3bc2d9701d1650dc25a800d4a2a6a85e01c785..c4ec069affe34c3497316f7733ccbc09666a8665 100644 (file)
 ##
 ## ---------------------------------------------------------------------
 
-
-
-
 #
 # Set up all necessary bits for the documentation
 #
 IF(DEAL_II_COMPONENT_DOCUMENTATION)
 
+  MESSAGE(STATUS "Setup documentation")
+
   #
   # Required packages for the document generation:
   #
@@ -46,10 +45,6 @@ IF(DEAL_II_COMPONENT_DOCUMENTATION)
   # Generate the source documentation via doxygen:
   #
   ADD_SUBDIRECTORY(doxygen)
-
-  #
-  # A custom target with the same name as the component:
-  #
   ADD_DEPENDENCIES(documentation doxygen)
 
   #
@@ -73,6 +68,8 @@ IF(DEAL_II_COMPONENT_DOCUMENTATION)
     COMPONENT documentation
     )
 
+  MESSAGE(STATUS "Setup documentation - Done")
+
 ENDIF(DEAL_II_COMPONENT_DOCUMENTATION)
 
 #
index 561b61f680279ade3c904dc628bac98af6f4e9b4..18464c88da72ad215b951e95bdb718431ca71300 100644 (file)
@@ -113,6 +113,16 @@ inconvenience this causes.
 
 
 <ol>
+  <li> Improved: The build system now supports usage of the library
+  out of the build directory without prior installation. This is done by
+  exporting an additional project configuration just for the build directory.
+  Furthermore, a bunch of convenience targets get now defined that just build
+  individual components (such as just the documentation or the libraries), and
+  if <tt>CMAKE_INSTALL_PREFIX</tt> is set, also install that specific component.
+  <br>
+  (Matthias Maier, Luca Heltai, 2013/12/03)
+  </li>
+
   <li> Fixed: Missing instantiations of SparseDirectMUMPS have been added.
   <br>
   (Timo Heister, 2013/11/25)
index 3655a42bf1df2155ef44e5e6452e2281f9862f44..45f41856a9202e7c2b50cfb4d1e51b94951f6b94 100644 (file)
@@ -15,6 +15,8 @@
 ## ---------------------------------------------------------------------
 
 IF(DEAL_II_COMPONENT_EXAMPLES)
+  MESSAGE(STATUS "Setup examples")
+
   INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
     DESTINATION ${DEAL_II_EXAMPLES_RELDIR}
     COMPONENT examples
@@ -42,4 +44,6 @@ IF(DEAL_II_COMPONENT_EXAMPLES)
     PATTERN "untitled.geo"         # step-49
     PATTERN "untitled.msh"         # step-49
     )
+
+  MESSAGE(STATUS "Setup examples - Done")
 ENDIF()
index cabda8f8fd9ac1d054fb83c0eb1ffed3bedf164a..dd6de69d3e4bf717c570534cbd751069762e466a 100644 (file)
@@ -14,6 +14,8 @@
 ##
 ## ---------------------------------------------------------------------
 
+MESSAGE(STATUS "Setup library")
+
 #
 # Compile the deal.II library
 #
@@ -114,3 +116,5 @@ INSTALL(EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
   DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
   COMPONENT library
   )
+
+MESSAGE(STATUS "Setup library - Done")

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.