]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Relocate testsuite macros and scripts to ./cmake/macros
authorMatthias Maier <tamiko@43-1.org>
Thu, 26 Mar 2015 13:48:25 +0000 (14:48 +0100)
committerMatthias Maier <tamiko@43-1.org>
Thu, 26 Mar 2015 15:18:15 +0000 (16:18 +0100)
This commit relocates all testsuite macros back to cmake/macros and
the run_test.cmake and normalize.pl script to cmake/scripts. Further, all
of those are copied to the build directory and installed appropriately.

18 files changed:
cmake/config/CMakeLists.txt
cmake/config/Config.cmake.in
cmake/config/Make.global_options.in
cmake/macros/macro_deal_ii_add_test.cmake [moved from tests/macro_add_test.cmake with 96% similarity]
cmake/macros/macro_deal_ii_pickup_tests.cmake [moved from tests/macro_pickup_tests.cmake with 100% similarity]
cmake/scripts/CMakeLists.txt
cmake/scripts/normalize.pl [moved from tests/normalize.pl with 100% similarity]
cmake/scripts/run_test.cmake [moved from tests/run_test.cmake with 100% similarity]
cmake/setup_deal_ii.cmake
doc/news/changes.h
doc/users/cmake.html
doc/users/cmakelists.html
doc/users/config.sample
tests/a-framework/CMakeLists.txt
tests/all-headers/CMakeLists.txt
tests/build_tests/CMakeLists.txt
tests/quick_tests/CMakeLists.txt
tests/setup_testsubproject.cmake

index 96971a4ea73e700274794a7fc37afa2476efac9a..534267b88c5a386de10e20eccfd811fb58353759 100644 (file)
@@ -38,7 +38,7 @@ CONFIGURE_FILE( # for binary dir:
 
 ########################################################################
 #                                                                      #
-#              Setup and install the convenience macros:               #
+#                   Setup and install cmake macros:                    #
 #                                                                      #
 ########################################################################
 
@@ -47,12 +47,14 @@ SET(_macros
   ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
   ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_setup_target.cmake
   ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_query_git_information.cmake
+  ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_add_test.cmake
+  ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_pickup_tests.cmake
   )
 FILE(COPY ${_macros}
-  DESTINATION ${CMAKE_BINARY_DIR}/${DEAL_II_CMAKE_MACROS_RELDIR}
+  DESTINATION ${CMAKE_BINARY_DIR}/${DEAL_II_SHARE_RELDIR}/macros
   )
 INSTALL(FILES ${_macros}
-  DESTINATION ${DEAL_II_CMAKE_MACROS_RELDIR}
+  DESTINATION ${DEAL_II_SHARE_RELDIR}/macros
   COMPONENT library
   )
 
index a80aeee0d2140c249e2bc2470cfa8b3bfdb4ce14..a1696dd3d39da9fb992fd7515d772d9aae5a6e29 100644 (file)
@@ -49,15 +49,14 @@ SET(DEAL_II_BUILD_TYPES "@DEAL_II_BUILD_TYPES@")
 # Information about the project location
 #
 
-SET(DEAL_II_CMAKE_MACROS_RELDIR "@DEAL_II_CMAKE_MACROS_RELDIR@")
-SET(DEAL_II_SHARE_RELDIR "@DEAL_II_SHARE_RELDIR@")
-SET(DEAL_II_DOCREADME_RELDIR "@DEAL_II_DOCREADME_RELDIR@")
 SET(DEAL_II_DOCHTML_RELDIR "@DEAL_II_DOCHTML_RELDIR@")
+SET(DEAL_II_DOCREADME_RELDIR "@DEAL_II_DOCREADME_RELDIR@")
 SET(DEAL_II_EXAMPLES_RELDIR "@DEAL_II_EXAMPLES_RELDIR@")
 SET(DEAL_II_EXECUTABLE_RELDIR "@DEAL_II_EXECUTABLE_RELDIR@")
 SET(DEAL_II_INCLUDE_RELDIR "@DEAL_II_INCLUDE_RELDIR@")
 SET(DEAL_II_LIBRARY_RELDIR "@DEAL_II_LIBRARY_RELDIR@")
 SET(DEAL_II_PROJECT_CONFIG_RELDIR "@DEAL_II_PROJECT_CONFIG_RELDIR@")
+SET(DEAL_II_SHARE_RELDIR "@DEAL_II_SHARE_RELDIR@")
 
 #
 # Determine DEAL_II_PATH from CMAKE_CURRENT_LIST_DIR:
@@ -96,7 +95,7 @@ ENDIF()
 #
 
 FILE(GLOB _macro_files
-  "${DEAL_II_PATH}/${DEAL_II_CMAKE_MACROS_RELDIR}/macro_deal_ii*.cmake"
+  "${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/macros/*.cmake"
   )
 FOREACH(file ${_macro_files})
   IF(NOT ${DEAL_II_PACKAGE_NAME}_FIND_QUIETLY)
index 697b0faaea0dc472c7d45d86abae51521d1601c6..86b7616989f254e1906689c50af25a0f3a29997c 100644 (file)
@@ -48,7 +48,6 @@ DEAL_II_BUILD_TYPES = @MAKEFILE_BUILD_TYPES@
 # Information about the project location
 #
 
-DEAL_II_CMAKE_MACROS_RELDIR = @DEAL_II_CMAKE_MACROS_RELDIR@
 DEAL_II_SHARE_RELDIR = @DEAL_II_SHARE_RELDIR@
 DEAL_II_DOCREADME_RELDIR = @DEAL_II_DOCREADME_RELDIR@
 DEAL_II_DOCHTML_RELDIR = @DEAL_II_DOCHTML_RELDIR@
similarity index 96%
rename from tests/macro_add_test.cmake
rename to cmake/macros/macro_deal_ii_add_test.cmake
index 654897969ae8c0436cb7e2a1e1f2e7bb714f398a..8862908f464610cb5de487b1ed7717754c15d99f 100644 (file)
@@ -45,7 +45,7 @@ MACRO(DEAL_II_ADD_TEST _category _test_name _comparison_file)
 
   IF(NOT DEAL_II_PROJECT_CONFIG_INCLUDED)
     MESSAGE(FATAL_ERROR
-      "\nDEAL_II_ADD_TEST can only be called in external test subprojects after "
+      "\nDEAL_II_ADD_TEST can only be called in external (test sub-) projects after "
       "the inclusion of deal.IIConfig.cmake. It is not intended for "
       "internal use.\n\n"
       )
@@ -191,14 +191,14 @@ MACRO(DEAL_II_ADD_TEST _category _test_name _comparison_file)
               && echo "${_test_full}: RUN failed. ------ Partial output:"
               && cat ${_test_directory}/failing_output
               && exit 1)
-        COMMAND
-          ${PERL_EXECUTABLE} -pi ${DEAL_II_SOURCE_DIR}/tests/normalize.pl
-                                 ${_test_directory}/output
+        COMMAND ${PERL_EXECUTABLE}
+          -pi ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/normalize.pl
+          ${_test_directory}/output
         WORKING_DIRECTORY
           ${_test_directory}
         DEPENDS
           ${_target}
-          ${DEAL_II_SOURCE_DIR}/tests/normalize.pl
+          ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/normalize.pl
         )
       ADD_CUSTOM_COMMAND(OUTPUT ${_test_directory}/diff
         COMMAND
@@ -256,7 +256,7 @@ MACRO(DEAL_II_ADD_TEST _category _test_name _comparison_file)
           -DEXPECT=${_expect}
           -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
           -DGUARD_FILE=${CMAKE_CURRENT_BINARY_DIR}/${_target}/interrupt_guard.cc
-          -P ${DEAL_II_SOURCE_DIR}/tests/run_test.cmake
+          -P ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.cmake
         WORKING_DIRECTORY ${_test_directory}
         )
       SET_TESTS_PROPERTIES(${_test_full} PROPERTIES
index 03f5bfbddd78a17645c3e540a8dc70712debe873..3feceadd9578e74a0be2c657279cb29c0f792759 100644 (file)
@@ -18,3 +18,15 @@ SET_TARGET_PROPERTIES(expand_instantiations_exe PROPERTIES
   OUTPUT_NAME expand_instantiations
   RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_EXECUTABLE_RELDIR}
   )
+
+SET(_scripts
+  ${CMAKE_CURRENT_SOURCE_DIR}/normalize.pl
+  ${CMAKE_CURRENT_SOURCE_DIR}/run_test.cmake
+  )
+FILE(COPY ${_scripts}
+  DESTINATION ${CMAKE_BINARY_DIR}/${DEAL_II_SHARE_RELDIR}/scripts
+  )
+INSTALL(FILES ${_scripts}
+  DESTINATION ${DEAL_II_SHARE_RELDIR}/scripts
+  COMPONENT library
+  )
index 30c5889cb52927a1ce8d5d73f3d579f27a468f0c..1450a76cd88c5aa5d65301c488a445ec69a2b7ce 100644 (file)
@@ -47,7 +47,6 @@
 #     DEAL_II_LIBRARY_RELDIR          *)
 #     DEAL_II_PROJECT_CONFIG_RELDIR   *)
 #     DEAL_II_SHARE_RELDIR            *)
-#     DEAL_II_CMAKE_MACROS_RELDIR     *)
 #     DEAL_II_DOCREADME_RELDIR        *)
 #     DEAL_II_DOCHTML_RELDIR          *)
 #     DEAL_II_EXAMPLES_RELDIR         *)
@@ -124,7 +123,6 @@ SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include")
 SET_IF_EMPTY(DEAL_II_LIBRARY_RELDIR "lib${LIB_SUFFIX}")
 SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/${DEAL_II_PROJECT_CONFIG_NAME}")
 SET_IF_EMPTY(DEAL_II_SHARE_RELDIR "share/${DEAL_II_PACKAGE_NAME}")
-SET_IF_EMPTY(DEAL_II_CMAKE_MACROS_RELDIR "${DEAL_II_SHARE_RELDIR}/cmake")
 #
 # ... but install the documentation into prominent places:
 #
index aca830aecdf3d3d0f94b7181ec3439c2d587f80a..e5c6a862aad5277dcaa459f85868936903a552da 100644 (file)
@@ -38,6 +38,13 @@ inconvenience this causes.
 </p>
 
 <ol>
+  <li> Removed: The CMake configuration does not use the variable
+  <code>DEAL_II_CMAKE_MACROS_RELDIR</code> any more. Instead, the fixed
+  location <code>${DEAL_II_SHARE_RELDIR}/macros</code> is used
+  unconditionally
+  <br>
+  (Matthias Maier, 2015/03/26)
+
   <li> Changed: The TrilinosWrappers::SparseMatrix::clear_row() function used
   to call TrilinosWrappers::SparseMatrix::compress() before doing its work,
   but this is neither efficient nor safe. You will now have to do this
index abe200fdb7abbac8e3273d935e5364564e27772d..113aa28f7c957342640d6f72bc392a55b57ad047 100644 (file)
@@ -921,7 +921,6 @@ DEAL_II_INCLUDE_RELDIR
 DEAL_II_LIBRARY_RELDIR
 DEAL_II_PROJECT_CONFIG_RELDIR
 DEAL_II_SHARE_RELDIR
-DEAL_II_CMAKE_MACROS_RELDIR
 DEAL_II_DOCREADME_RELDIR
 DEAL_II_DOCHTML_RELDIR
 DEAL_II_EXAMPLES_RELDIR
index 0a9869971a09928276013f9f08eec5e6d877d925..1beb81588d52a2819e887174183f899a98343c7b 100644 (file)
@@ -731,7 +731,6 @@ DEAL_II_BUILD_TYPES         - an all caps list of available configurations,
 #
 
 DEAL_II_PATH
-DEAL_II_CMAKE_MACROS_RELDIR
 DEAL_II_SHARE_RELDIR
 DEAL_II_DOCREADME_RELDIR
 DEAL_II_DOCHTML_RELDIR
index fd45b09d1e8fa2b69edbda8c474fc4e3d64bbb6f..d45cac19f0538b6e59c0d99f0eb0003a9a0b2a9f 100644 (file)
 #   "Library suffix for the release library"
 #   )
 #
-# SET(DEAL_II_CMAKE_MACROS_RELDIR "cmake/macros" CACHE STRING
-#   "Relative installation directory for macros"
-#   )
-#
 # SET(DEAL_II_DOCHTML_RELDIR "doc" CACHE STRING
 #   "Relative installation directory for html documentation"
 #   )
index 3f4f7fa5ac64466dc7dd34dc97dbeca2dbff1cad..73bbb73385f5568c8a9b7139ad5742afead8440e 100644 (file)
@@ -23,7 +23,7 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES})
     ADD_TEST(NAME ${_test}
       COMMAND ${CMAKE_COMMAND} -DTRGT=${_target} -DTEST=${_test}
         -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR} -DEXPECT=CONFIGURE
-        -P ${DEAL_II_SOURCE_DIR}/tests/run_test.cmake
+        -P ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.cmake
       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
       )
     SET_TESTS_PROPERTIES(${_test} PROPERTIES
index b29d103c71e4edffffa4e0120bd3393e322dd729..059736574367a3365e86b857bc9a32a3eb94466e 100644 (file)
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2013 - 2014 by the deal.II authors
+## Copyright (C) 2013 - 2015 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -87,7 +87,7 @@ FOREACH(_header ${_headers})
         COMMAND ${CMAKE_COMMAND} -DTRGT=${_target}.build -DTEST=${_test}
           -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
           -DGUARD_FILE=${CMAKE_CURRENT_BINARY_DIR}/${_target}_interrupt_guard.cc
-          -P ${DEAL_II_SOURCE_DIR}/tests/run_test.cmake
+          -P ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.cmake
         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
         )
       SET_TESTS_PROPERTIES(${_test} PROPERTIES
index 867985d49c20bab74a9b47ef0dbff6f9ac9c830a..04cce5bc90fa5386282e554cc5a7de3e1b322500 100644 (file)
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2013 - 2014 by the deal.II authors
+## Copyright (C) 2013 - 2015 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -181,7 +181,7 @@ FOREACH(_step_full ${_steps})
         COMMAND ${CMAKE_COMMAND} -DTRGT=${_target} -DTEST=${_test}
           -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
           -DGUARD_FILE=${_step_dir}/interrupt_guard
-          -P ${DEAL_II_SOURCE_DIR}/tests/run_test.cmake
+          -P ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.cmake
         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
         )
       SET_TESTS_PROPERTIES(${_test} PROPERTIES
index 3b70b91423cf1f20831b13bef59bf6f3d8d5bdc0..33e256cd6ee6ebff6ffd654e9df58fcd724348fe 100644 (file)
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2013 - 2014 by the deal.II authors
+## Copyright (C) 2013 - 2015 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -67,7 +67,7 @@ MACRO(make_quicktest test_basename build_name mpi_run)
   ADD_TEST(NAME ${_target}
     COMMAND ${CMAKE_COMMAND} -DTRGT=${_target}.run -DTEST=${_target}
       -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
-      -P ${CMAKE_SOURCE_DIR}/tests/run_test.cmake
+      -P ${CMAKE_SOURCE_DIR}/cmake/scripts/run_test.cmake
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
   SET_TESTS_PROPERTIES(${_target} PROPERTIES LABEL "sanity checks")
index d1c63d07bab47879fb79ffc0ac4006b970bc33c6..4488e3d4af138bf960a63ed8f9e70deaa0dd73ef 100644 (file)
@@ -41,7 +41,6 @@ FOREACH(_var
   SET(${_var} ${${_var}})
 ENDFOREACH()
 
-
 #
 # Load all macros:
 #
@@ -50,9 +49,6 @@ FOREACH(_file ${_macro_files})
   INCLUDE(${_file})
 ENDFOREACH()
 
-INCLUDE(${DEAL_II_SOURCE_DIR}/tests/macro_add_test.cmake)
-INCLUDE(${DEAL_II_SOURCE_DIR}/tests/macro_pickup_tests.cmake)
-
 #
 # Pick up values from environment:
 #

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.