From 20a0bb95992f837a884a4fc6069b2b465b639bf3 Mon Sep 17 00:00:00 2001 From: maier Date: Mon, 17 Sep 2012 22:13:36 +0000 Subject: [PATCH] Reorganize includes and the general layout under contrib/cmake git-svn-id: https://svn.dealii.org/branches/branch_cmake@26458 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/CMakeLists.txt | 5 +++-- .../contrib/cmake/check/check_for_compiler_bugs.cmake | 4 ---- .../cmake/check/check_for_compiler_features.cmake | 5 ----- deal.II/contrib/cmake/check/check_for_cxx_features.cmake | 5 ----- deal.II/contrib/cmake/configure/configure_blas.cmake | 2 -- deal.II/contrib/cmake/configure/configure_tbb.cmake | 1 - deal.II/contrib/cmake/configure/configure_trilinos.cmake | 3 --- .../cmake/{configure => }/setup_cached_variables.cmake | 0 .../contrib/cmake/{configure => }/setup_deal_ii.cmake | 0 deal.II/contrib/cmake/setup_external_macros.cmake | 9 +++++++++ 10 files changed, 12 insertions(+), 22 deletions(-) rename deal.II/contrib/cmake/{configure => }/setup_cached_variables.cmake (100%) rename deal.II/contrib/cmake/{configure => }/setup_deal_ii.cmake (100%) create mode 100644 deal.II/contrib/cmake/setup_external_macros.cmake diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt index d52358bc85..25a329e300 100644 --- a/deal.II/CMakeLists.txt +++ b/deal.II/CMakeLists.txt @@ -176,11 +176,10 @@ SET(CMAKE_INCLUDE_CURRENT_DIR true) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} + "${CMAKE_SOURCE_DIR}/contrib/cmake/" "${CMAKE_SOURCE_DIR}/contrib/cmake/modules/" - "${CMAKE_SOURCE_DIR}/contrib/cmake/configure/" ) - # # Load all macros: # @@ -190,6 +189,8 @@ FOREACH(file ${macro_files}) INCLUDE(${file}) ENDFOREACH() +INCLUDE(setup_external_macros) + # # We have to initialize some cached variable before PROJECT is called, so diff --git a/deal.II/contrib/cmake/check/check_for_compiler_bugs.cmake b/deal.II/contrib/cmake/check/check_for_compiler_bugs.cmake index e2293a41b6..ca7fae17c1 100644 --- a/deal.II/contrib/cmake/check/check_for_compiler_bugs.cmake +++ b/deal.II/contrib/cmake/check/check_for_compiler_bugs.cmake @@ -1,12 +1,8 @@ -INCLUDE(CheckCXXSourceCompiles) -INCLUDE(CheckIncludeFiles) - # # Check for various compiler bugs: # - # # Versions of GCC before 3.0 had a problem with the explicit # instantiation of member templates when the member was in fact diff --git a/deal.II/contrib/cmake/check/check_for_compiler_features.cmake b/deal.II/contrib/cmake/check/check_for_compiler_features.cmake index 63e8dcb03e..dcfc7fd2e5 100644 --- a/deal.II/contrib/cmake/check/check_for_compiler_features.cmake +++ b/deal.II/contrib/cmake/check/check_for_compiler_features.cmake @@ -1,8 +1,3 @@ -INCLUDE(CheckCXXSourceCompiles) -INCLUDE(CheckCXXCompilerFlag) -INCLUDE(CheckCXXSourceRuns) - - # # Check for various compiler features. # diff --git a/deal.II/contrib/cmake/check/check_for_cxx_features.cmake b/deal.II/contrib/cmake/check/check_for_cxx_features.cmake index b405c9980a..2fd7f860ca 100644 --- a/deal.II/contrib/cmake/check/check_for_cxx_features.cmake +++ b/deal.II/contrib/cmake/check/check_for_cxx_features.cmake @@ -1,8 +1,3 @@ -INCLUDE(CheckCXXSourceCompiles) -INCLUDE(CheckCXXCompilerFlag) -INCLUDE(CheckCXXSourceRuns) -INCLUDE(CheckIncludeFiles) - # # Check for various C++ language features # diff --git a/deal.II/contrib/cmake/configure/configure_blas.cmake b/deal.II/contrib/cmake/configure/configure_blas.cmake index 3f12dc282d..ae48d4cebb 100644 --- a/deal.II/contrib/cmake/configure/configure_blas.cmake +++ b/deal.II/contrib/cmake/configure/configure_blas.cmake @@ -2,8 +2,6 @@ # Configuration for the blas library: # -INCLUDE(CheckFunctionExists) - MACRO(FEATURE_BLAS_FIND_EXTERNAL var) FIND_PACKAGE(BLAS) diff --git a/deal.II/contrib/cmake/configure/configure_tbb.cmake b/deal.II/contrib/cmake/configure/configure_tbb.cmake index 1a56771c3f..f314bf1428 100644 --- a/deal.II/contrib/cmake/configure/configure_tbb.cmake +++ b/deal.II/contrib/cmake/configure/configure_tbb.cmake @@ -2,7 +2,6 @@ # Configuration for the tbb library: # -INCLUDE(CheckCXXSourceCompiles) # # Set up genereal threading. The macro will be included in diff --git a/deal.II/contrib/cmake/configure/configure_trilinos.cmake b/deal.II/contrib/cmake/configure/configure_trilinos.cmake index c0ce95bb31..ff074eeb99 100644 --- a/deal.II/contrib/cmake/configure/configure_trilinos.cmake +++ b/deal.II/contrib/cmake/configure/configure_trilinos.cmake @@ -2,9 +2,6 @@ # Configuration for the trilinos library: # -INCLUDE(CheckCXXSourceCompiles) -INCLUDE(CheckIncludeFile) - MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) diff --git a/deal.II/contrib/cmake/configure/setup_cached_variables.cmake b/deal.II/contrib/cmake/setup_cached_variables.cmake similarity index 100% rename from deal.II/contrib/cmake/configure/setup_cached_variables.cmake rename to deal.II/contrib/cmake/setup_cached_variables.cmake diff --git a/deal.II/contrib/cmake/configure/setup_deal_ii.cmake b/deal.II/contrib/cmake/setup_deal_ii.cmake similarity index 100% rename from deal.II/contrib/cmake/configure/setup_deal_ii.cmake rename to deal.II/contrib/cmake/setup_deal_ii.cmake diff --git a/deal.II/contrib/cmake/setup_external_macros.cmake b/deal.II/contrib/cmake/setup_external_macros.cmake new file mode 100644 index 0000000000..415c8489fe --- /dev/null +++ b/deal.II/contrib/cmake/setup_external_macros.cmake @@ -0,0 +1,9 @@ +# +# Include all external (cmake) macros that we will use: +# + +INCLUDE(CheckCXXCompilerFlag) +INCLUDE(CheckCXXSourceCompiles) +INCLUDE(CheckCXXSourceRuns) +INCLUDE(CheckFunctionExists) +INCLUDE(CheckIncludeFiles) -- 2.39.5