]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Unify configure output, print all file inclusions 397/head
authorMatthias Maier <tamiko@kyomu.43-1.org>
Fri, 2 Jan 2015 00:57:25 +0000 (01:57 +0100)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Fri, 2 Jan 2015 11:30:38 +0000 (12:30 +0100)
CMakeLists.txt
cmake/macros/macro_verbose_include.cmake [new file with mode: 0644]
cmake/setup_cached_variables.cmake
cmake/setup_compiler_flags.cmake

index 4a2173045a78f685df9a5fe87f79c2cb7bb449e9..462ad74893b52be3bdfd4e1f0d152cfbaf363253 100644 (file)
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2014 by the deal.II authors
+## Copyright (C) 2012 - 2015 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
 #
 # General configuration for cmake:
 #
-
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
 
+MESSAGE(STATUS "This is CMake ${CMAKE_VERSION}")
+MESSAGE(STATUS "")
+
 IF(POLICY CMP0026)
   # enable target LOCATION property
   CMAKE_POLICY(SET CMP0026 OLD)
@@ -43,19 +45,17 @@ IF(POLICY CMP0037)
   CMAKE_POLICY(SET CMP0037 OLD)
 ENDIF()
 
-MESSAGE(STATUS "This is CMake ${CMAKE_VERSION}")
 
-LIST(APPEND CMAKE_MODULE_PATH
-  ${CMAKE_SOURCE_DIR}/cmake/
-  ${CMAKE_SOURCE_DIR}/cmake/modules/
-  )
+LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 
 #
 # Load all macros:
 #
-INCLUDE(setup_external_macros)
 FILE(GLOB _macro_files "cmake/macros/*.cmake")
+MESSAGE(STATUS "Include ${CMAKE_SOURCE_DIR}/cmake/setup_external_macros.cmake")
+INCLUDE(${CMAKE_SOURCE_DIR}/cmake/setup_external_macros.cmake)
 FOREACH(_file ${_macro_files})
+  MESSAGE(STATUS "Include ${_file}")
   INCLUDE(${_file})
 ENDFOREACH()
 
@@ -78,7 +78,7 @@ ENDIF()
 # We have to initialize some cached variables before PROJECT is called, so
 # do it at this point:
 #
-INCLUDE(setup_cached_variables)
+VERBOSE_INCLUDE(${CMAKE_SOURCE_DIR}/cmake/setup_cached_variables.cmake)
 
 #
 # Now, set the project and set up the rest:
@@ -86,18 +86,15 @@ INCLUDE(setup_cached_variables)
 PROJECT(deal.II CXX C)
 ENABLE_LANGUAGE_OPTIONAL(Fortran)
 
-INCLUDE(setup_deal_ii)
+VERBOSE_INCLUDE(${CMAKE_SOURCE_DIR}/cmake/setup_deal_ii.cmake)
 
-INCLUDE(setup_compiler_flags)
+VERBOSE_INCLUDE(${CMAKE_SOURCE_DIR}/cmake/setup_compiler_flags.cmake)
 
 #
 # Include information about bundled libraries:
 #
 IF(DEAL_II_HAVE_BUNDLED_DIRECTORY)
-  SET(_file ${CMAKE_SOURCE_DIR}/bundled/setup_bundled.cmake)
-  MESSAGE(STATUS "")
-  MESSAGE(STATUS "Include ${_file}")
-  INCLUDE(${_file})
+  VERBOSE_INCLUDE(${CMAKE_SOURCE_DIR}/bundled/setup_bundled.cmake)
 ENDIF()
 
 #
@@ -106,9 +103,7 @@ ENDIF()
 FILE(GLOB _check_files "cmake/checks/*.cmake")
 LIST(SORT _check_files)
 FOREACH(_file ${_check_files})
-  MESSAGE(STATUS "")
-  MESSAGE(STATUS "Include ${_file}")
-  INCLUDE(${_file})
+  VERBOSE_INCLUDE(${_file})
 ENDFOREACH()
 
 #
@@ -117,22 +112,20 @@ ENDFOREACH()
 FILE(GLOB _configure_files "cmake/configure/configure_*.cmake")
 LIST(SORT _configure_files) # make sure to include in alphabetical order
 FOREACH(_file ${_configure_files})
-  MESSAGE(STATUS "")
-  MESSAGE(STATUS "Include ${_file}")
-  INCLUDE(${_file})
+  VERBOSE_INCLUDE(${_file})
 ENDFOREACH()
 
 #
 # Finalize the configuration:
 #
-INCLUDE(setup_custom_targets)
-INCLUDE(setup_finalize)
-INCLUDE(setup_write_config)
+VERBOSE_INCLUDE(${CMAKE_SOURCE_DIR}/cmake/setup_custom_targets.cmake)
+VERBOSE_INCLUDE(${CMAKE_SOURCE_DIR}/cmake/setup_finalize.cmake)
+VERBOSE_INCLUDE(${CMAKE_SOURCE_DIR}/cmake/setup_write_config.cmake)
 
 #
 # CPack configuration
 #
-INCLUDE(setup_cpack)
+VERBOSE_INCLUDE(${CMAKE_SOURCE_DIR}/cmake/setup_cpack.cmake)
 
 ########################################################################
 #                                                                      #
diff --git a/cmake/macros/macro_verbose_include.cmake b/cmake/macros/macro_verbose_include.cmake
new file mode 100644 (file)
index 0000000..58790cf
--- /dev/null
@@ -0,0 +1,20 @@
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2014 - 2015 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.
+##
+## ---------------------------------------------------------------------
+
+MACRO(VERBOSE_INCLUDE _file)
+  MESSAGE(STATUS "")
+  MESSAGE(STATUS "Include ${_file}")
+  INCLUDE(${_file})
+ENDMACRO()
index 281a7efe771ac3597ed204e9dfcb65194d7b90ea..bdb1170e4274d90e32d787f3bbdb09fff442ba9b 100644 (file)
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2014 by the deal.II authors
+## Copyright (C) 2012 - 2015 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -59,9 +59,6 @@
 #     overwritten by environment)
 #
 
-MESSAGE(STATUS "")
-MESSAGE(STATUS "Setting up cached variables.")
-
 
 ########################################################################
 #                                                                      #
index 99d6338b82f93af4872373ba30e0fd6c5e6e20bc..ed35485116237915ca5561b5ef7a1ab325de5ad7 100644 (file)
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2015 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -67,7 +67,6 @@
 
 IF(NOT "${DEAL_II_CXX_FLAGS_SAVED}" STREQUAL "${CACHED_DEAL_II_CXX_FLAGS_SAVED}"
    OR NOT "${DEAL_II_LINKER_FLAGS_SAVED}" STREQUAL "${CACHED_DEAL_II_LINKER_FLAGS_SAVED}")
-  MESSAGE(STATUS "")
   # Rerun this test if cxx flags changed:
   UNSET(DEAL_II_HAVE_USABLE_CXX_FLAGS CACHE)
 ELSE()
@@ -105,15 +104,13 @@ IF(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
   #
   # *Hooray* We are allowed to set compiler flags :-]
   #
-  MESSAGE(STATUS "")
-  MESSAGE(STATUS "Setting up default compiler flags.")
 
   #
   # General setup for GCC and compilers sufficiently close to GCC:
   #
   IF( CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR
       CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
-    INCLUDE(setup_compiler_flags_gnu)
+    VERBOSE_INCLUDE(${CMAKE_SOURCE_DIR}/cmake/setup_compiler_flags_gnu.cmake)
     SET(DEAL_II_KNOWN_COMPILER TRUE)
   ENDIF()
 
@@ -121,7 +118,7 @@ IF(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
   # Setup for ICC compiler (version >= 10):
   #
   IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
-    INCLUDE(setup_compiler_flags_intel)
+    VERBOSE_INCLUDE(${CMAKE_SOURCE_DIR}/cmake/setup_compiler_flags_intel.cmake)
     SET(DEAL_II_KNOWN_COMPILER TRUE)
   ENDIF()
 
@@ -129,7 +126,7 @@ IF(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
   # Setup for MSVC compiler (version >= 2012):
   #
    IF(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
-    INCLUDE(setup_compiler_flags_msvc)
+    VERBOSE_INCLUDE(${CMAKE_SOURCE_DIR}/cmake/setup_compiler_flags_msvc.cmake)
     SET(DEAL_II_KNOWN_COMPILER TRUE)
   ENDIF()
 
@@ -143,7 +140,6 @@ IF(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
 
 ELSE(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
 
-  MESSAGE(STATUS "")
   MESSAGE(STATUS
     "Skipped setup of default compiler flags "
     "(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS=OFF)"

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.