]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Reorganize the top level CMakeLists.txt file
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 17 Sep 2012 22:02:11 +0000 (22:02 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 17 Sep 2012 22:02:11 +0000 (22:02 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26457 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/contrib/cmake/configure/configure_boost.cmake
deal.II/contrib/cmake/configure/configure_tbb.cmake
deal.II/contrib/cmake/configure/setup_cached_variables.cmake [moved from deal.II/contrib/cmake/configure/configure_cached_variables.cmake with 100% similarity]
deal.II/contrib/cmake/configure/setup_deal_ii.cmake [moved from deal.II/contrib/cmake/configure/configure_deal_ii.cmake with 100% similarity]

index 5ba9d52f168e60d7ea78700231b9a40eea2d275e..d52358bc850300dfd29658133b987578b41dd395 100644 (file)
@@ -110,7 +110,6 @@ OPTION(DEAL_II_FORCE_CONTRIB_FUNCTIONPARSER
   "Always use the bundled functionparser library instead of an external one."
   OFF)
 
-
 OPTION(DEAL_II_WITH_LAPACK
   "Build deal.II with support for LAPACK."
   OFF)
@@ -175,6 +174,13 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
 
 SET(CMAKE_INCLUDE_CURRENT_DIR true)
 
+SET(CMAKE_MODULE_PATH
+  ${CMAKE_MODULE_PATH}
+  "${CMAKE_SOURCE_DIR}/contrib/cmake/modules/"
+  "${CMAKE_SOURCE_DIR}/contrib/cmake/configure/"
+  )
+
+
 #
 # Load all macros:
 #
@@ -184,26 +190,19 @@ FOREACH(file ${macro_files})
   INCLUDE(${file})
 ENDFOREACH()
 
-SET(CMAKE_MODULE_PATH
-  ${CMAKE_MODULE_PATH}
-  "${CMAKE_SOURCE_DIR}/contrib/cmake/modules/"
-  "${CMAKE_SOURCE_DIR}/contrib/cmake/configure/"
-  )
-
 
 #
 # We have to initialize some cached variable before PROJECT is called, so
 # configure the cached, user editable CMAKE_BUILD_TYPES, CMAKE_CXX_FLAGS,
 # etc. variables at this point:
 #
-INCLUDE(configure_cached_variables)
+INCLUDE(setup_cached_variables)
 
 #
 # Now, set the project and configure some deal_II specific variables:
 #
 PROJECT(deal.II)
-
-INCLUDE(configure_deal_ii)
+INCLUDE(setup_deal_ii)
 
 
 #
@@ -251,24 +250,17 @@ ENDFOREACH()
 #
 # Feature configuration:
 #
+FILE(GLOB configure_files "contrib/cmake/configure/configure_*.cmake")
+
+# Make sure configure_boost.cmake comes after configure_tbb.cmake:
+LIST(SORT configure_files)
+LIST(REVERSE configure_files) # :-]
+
+FOREACH(file ${configure_files})
+  MESSAGE(STATUS "Include ${file}")
+  INCLUDE(${file})
+ENDFOREACH()
 
-#
-# TODO: Resolve this boost dependency so that we can automatically include
-# configure_[...] files
-#
-INCLUDE(configure_arpack)
-INCLUDE(configure_blas)
-INCLUDE(configure_lapack)
-INCLUDE(configure_functionparser)
-INCLUDE(configure_metis)
-INCLUDE(configure_mpi)
-INCLUDE(configure_netcdf)
-INCLUDE(configure_p4est)
-INCLUDE(configure_tbb)
-INCLUDE(configure_boost) # depends on variables defined in configure_tbb
-INCLUDE(configure_trilinos)
-INCLUDE(configure_umfpack)
-INCLUDE(configure_zlib)
 
 
 
@@ -285,10 +277,11 @@ INCLUDE(configure_zlib)
 
 ADD_SUBDIRECTORY(common)
 
-CONFIGURE_FILE(
-  ${CMAKE_CURRENT_SOURCE_DIR}/Version.in
-  ${CMAKE_CURRENT_BINARY_DIR}/Version
-  )
+# TODO
+# CONFIGURE_FILE(
+#   ${CMAKE_CURRENT_SOURCE_DIR}/Version.in
+#   ${CMAKE_CURRENT_BINARY_DIR}/Version
+#   )
 
 
 #
index e1b985eea4d6ede0e0a9cf7dffaa73976c67e175..b94bc1a50154d957e04449b87f39a2fba6b89d88 100644 (file)
@@ -2,11 +2,24 @@
 # Configuration for the boost library:
 #
 
+#
 # Always true. We need it :-]
+#
 SET(DEAL_II_WITH_BOOST "ON"
   CACHE STRING "Build deal.II with support for boost." FORCE
   )
 
+#
+# This configure script has to be included after configure_tbb.
+# We need some of the variables defined in SETUP_THREADING for
+# the setup of the contrib boost library (if used)
+#
+IF(NOT FEATURE_TBB_HAVE_CONTRIB)
+  MESSAGE(FATAL_ERROR
+    "Internal build system error: configure_boost.cmake included before configure_tbb.cmake"
+    )
+ENDIF()
+
 
 MACRO(FEATURE_BOOST_FIND_EXTERNAL var)
 
index ea8e1672ff6100935952007696222ac3513a97cf..1a56771c3f4cddffb3805eb8e9aafc7c31b3de5e 100644 (file)
@@ -128,7 +128,7 @@ MACRO(FEATURE_TBB_CONFIGURE_CONTRIB var)
   # Add tbb directly to the object files of deal.II
   #
 
-  # Setup threading (before configurating our build...)
+  # Setup threading (before configuring our build...)
   # and if successfull return TRUE:
   SETUP_THREADING(${var})
 

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.