From: Matthias Maier Date: Fri, 2 Jan 2015 00:57:25 +0000 (+0100) Subject: CMake: Unify configure output, print all file inclusions X-Git-Tag: v8.3.0-rc1~572^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F397%2Fhead;p=dealii.git CMake: Unify configure output, print all file inclusions --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a2173045a..462ad74893 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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. ## @@ -30,9 +30,11 @@ # # 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 index 0000000000..58790cf91b --- /dev/null +++ b/cmake/macros/macro_verbose_include.cmake @@ -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() diff --git a/cmake/setup_cached_variables.cmake b/cmake/setup_cached_variables.cmake index 281a7efe77..bdb1170e42 100644 --- a/cmake/setup_cached_variables.cmake +++ b/cmake/setup_cached_variables.cmake @@ -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.") - ######################################################################## # # diff --git a/cmake/setup_compiler_flags.cmake b/cmake/setup_compiler_flags.cmake index 99d6338b82..ed35485116 100644 --- a/cmake/setup_compiler_flags.cmake +++ b/cmake/setup_compiler_flags.cmake @@ -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)"