]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Refactor testsuite setup into DEAL_II_PICKUP_TESTS
authorMatthias Maier <tamiko@43-1.org>
Thu, 26 Mar 2015 14:36:35 +0000 (15:36 +0100)
committerMatthias Maier <tamiko@43-1.org>
Thu, 26 Mar 2015 17:22:37 +0000 (18:22 +0100)
This commit refactors all the testsuite setup that was originally done in
setup_testsuitesubproject.cmake into the DEAL_II_PICKUP_TESTS macro defined
in ./cmake/macros/macro_deal_ii_pickup_tests.cmake

34 files changed:
cmake/macros/macro_deal_ii_pickup_tests.cmake
cmake/macros/macro_set_if_empty.cmake
tests/CMakeLists.txt
tests/a-framework/CMakeLists.txt
tests/algorithms/CMakeLists.txt
tests/all-headers/CMakeLists.txt
tests/aniso/CMakeLists.txt
tests/arpack/CMakeLists.txt
tests/base/CMakeLists.txt
tests/bits/CMakeLists.txt
tests/build_tests/CMakeLists.txt
tests/codim_one/CMakeLists.txt
tests/deal.II/CMakeLists.txt
tests/distributed_grids/CMakeLists.txt
tests/fe/CMakeLists.txt
tests/gla/CMakeLists.txt
tests/grid/CMakeLists.txt
tests/hp/CMakeLists.txt
tests/integrators/CMakeLists.txt
tests/lac/CMakeLists.txt
tests/lapack/CMakeLists.txt
tests/manifold/CMakeLists.txt
tests/matrix_free/CMakeLists.txt
tests/mesh_converter/CMakeLists.txt
tests/metis/CMakeLists.txt
tests/mpi/CMakeLists.txt
tests/multigrid/CMakeLists.txt
tests/opencascade/CMakeLists.txt
tests/petsc/CMakeLists.txt
tests/serialization/CMakeLists.txt
tests/setup_testsubproject.cmake
tests/slepc/CMakeLists.txt
tests/trilinos/CMakeLists.txt
tests/umfpack/CMakeLists.txt

index 3d4b1c109db252d1193e4dd8ae219491ac3517d4..397661f90ea6838c1179541f4858b91ed4a6454d 100644 (file)
 ## ---------------------------------------------------------------------
 
 #
-# A macro to pick up all tests in a test subdirectory
+# A macro to set up testing and pick up all tests in a test subdirectory.
 #
 # If TEST_PICKUP_REGEX is set, only tests matching the regex will be
 # processed.
 #
+# Furthermore, the macro sets up (if necessary) deal.II, perl, a diff tool
+# and the following variables, that can be overwritten by environment or
+# command line:
+#
+#     TEST_DIFF
+#     TEST_TIME_LIMIT
+#     TEST_PICKUP_REGEX
+#
 # Usage:
 #     DEAL_II_PICKUP_TESTS()
 #
 
+
+#
+# Used in DEAL_II_PICKUP_TESTS
+#
+MACRO(SET_IF_EMPTY _variable)
+  IF("${${_variable}}" STREQUAL "")
+    SET(${_variable} ${ARGN})
+  ENDIF()
+ENDMACRO()
+
+#
+# Used in DEAL_II_ADD_TEST
+#
+MACRO(ITEM_MATCHES _var _regex)
+  SET(${_var})
+  FOREACH (_item ${ARGN})
+    IF("${_item}" MATCHES ${_regex})
+      SET(${_var} TRUE)
+      BREAK()
+    ENDIF()
+  ENDFOREACH()
+ENDMACRO()
+
+
 MACRO(DEAL_II_PICKUP_TESTS)
+
+  IF(NOT DEAL_II_PROJECT_CONFIG_INCLUDED)
+    MESSAGE(FATAL_ERROR
+      "\nDEAL_II_PICKUP_TESTS 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"
+      )
+  ENDIF()
+
+  IF(NOT DEAL_II_TARGET_CONFIG_INCLUDED)
+    INCLUDE(${DEAL_II_TARGET_CONFIG})
+    SET(DEAL_II_TARGET_CONFIG_INCLUDED TRUE)
+  ENDIF()
+
+  #
+  # We need perl:
+  #
+
+  FIND_PACKAGE(Perl REQUIRED)
+
+  #
+  # We need a diff tool, preferably numdiff:
+  #
+
+  FIND_PROGRAM(DIFF_EXECUTABLE
+    NAMES diff
+    HINTS ${DIFF_DIR}
+    PATH_SUFFIXES bin
+    )
+
+  FIND_PROGRAM(NUMDIFF_EXECUTABLE
+    NAMES numdiff
+    HINTS ${NUMDIFF_DIR}
+    PATH_SUFFIXES bin
+    )
+
+  MARK_AS_ADVANCED(DIFF_EXECUTABLE NUMDIFF_EXECUTABLE)
+
+  SET_IF_EMPTY(TEST_DIFF "$ENV{TEST_DIFF}")
+  IF("${TEST_DIFF}" STREQUAL "")
+    #
+    # No TEST_DIFF is set, specify one:
+    #
+
+    IF(NOT NUMDIFF_EXECUTABLE MATCHES "-NOTFOUND")
+      SET(TEST_DIFF ${NUMDIFF_EXECUTABLE} -a 1e-6 -r 1e-8 -s ' \\t\\n:<>=,;')
+      IF(DIFF_EXECUTABLE MATCHES "-NOTFOUND")
+        SET(DIFF_EXECUTABLE ${NUMDIFF_EXECUTABLE})
+      ENDIF()
+    ELSEIF(NOT DIFF_EXECUTABLE MATCHES "-NOTFOUND")
+      SET(TEST_DIFF ${DIFF_EXECUTABLE})
+    ELSE()
+      MESSAGE(FATAL_ERROR
+        "Could not find diff or numdiff. One of those are required for running the testsuite.\n"
+        "Please specify TEST_DIFF by hand."
+        )
+    ENDIF()
+  ENDIF()
+
+  SET_IF_EMPTY(TEST_TIME_LIMIT "$ENV{TEST_TIME_LIMIT}")
+  SET_IF_EMPTY(TEST_TIME_LIMIT 600)
+
+  #
+  # Enable testing...
+  #
+
+  ENABLE_TESTING()
+
+  #
+  # ... and finally pick up tests:
+  #
+
   SET_IF_EMPTY(TEST_PICKUP_REGEX "$ENV{TEST_PICKUP_REGEX}")
 
+
   GET_FILENAME_COMPONENT(_category ${CMAKE_CURRENT_SOURCE_DIR} NAME)
 
   SET(DEAL_II_SOURCE_DIR) # avoid a bogus warning
index b1ce77ffa817582cf61c643597faed032d04c1b9..05e0aeb291ce4d4bf77cb85ecd133117476b4d15 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.
 ##
@@ -21,4 +21,3 @@ MACRO(SET_IF_EMPTY _variable)
     SET(${_variable} ${ARGN})
   ENDIF()
 ENDMACRO()
-
index 6879a5caf3467bab1b884f4cbf11290735f8348d..d611c3db6f325446b4efe842c49264a6f061cf27 100644 (file)
@@ -46,8 +46,10 @@ FILE(WRITE ${CMAKE_BINARY_DIR}/tests/CTestTestfile.cmake "")
 #
 
 SET(_options "")
-LIST(APPEND _options -DDEAL_II_SOURCE_DIR=${CMAKE_SOURCE_DIR})
-LIST(APPEND _options -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR})
+LIST(APPEND _options
+  -DDEAL_II_DIR=${CMAKE_BINARY_DIR}
+  -DDEAL_II_SOURCE_DIR=${CMAKE_SOURCE_DIR}
+  )
 FOREACH(_var
   DIFF_DIR NUMDIFF_DIR TEST_DIFF TEST_PICKUP_REGEX TEST_TIME_LIMIT
   MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXEC_POSTFLAGS
index 73bbb73385f5568c8a9b7139ad5742afead8440e..e8698c4f17268e25f508270fed208f9b9fefe64b 100644 (file)
@@ -1,7 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
 
 #
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 059736574367a3365e86b857bc9a32a3eb94466e..08533b7180dca7016508d0f50c366a0a8964a8c0 100644 (file)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
+
+#
+# Set up test environment (does not pick up anything):
+#
+DEAL_II_PICKUP_TESTS()
 
 #
 # Header tests are special:
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index fb428b8238ee356911230d68fe1179171f0fb9bc..7b57c1e4e8e771ef7e62528482cc8aa7dcfd8d1e 100644 (file)
@@ -1,7 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_ARPACK)
   DEAL_II_PICKUP_TESTS()
 ENDIF()
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 04cce5bc90fa5386282e554cc5a7de3e1b322500..8279e6741a019a86ee94230c803c20950c138de8 100644 (file)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
+
+#
+# Set up test environment (does not pick up anything):
+#
+DEAL_II_PICKUP_TESTS()
 
 #
 # build_tests tests are special:
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 6f92c291bf6c4b009070dc0632390ac8b3e66dbd..4c1a02d789b42bd66cdf2e3eb1e03c3d72fa6180 100644 (file)
@@ -1,7 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_P4EST)
   DEAL_II_PICKUP_TESTS()
 ENDIF()
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index af5f8ec27a816bbdef66b7e66c36a4959fb08d41..3f784ff97fb63adccd165a93f103e2104ec4738a 100644 (file)
@@ -1,7 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_MPI AND DEAL_II_WITH_P4EST AND DEAL_II_WITH_PETSC AND DEAL_II_WITH_TRILINOS)
   DEAL_II_PICKUP_TESTS()
 ENDIF()
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 2e6d0bece94811a56895ec009b4a6894ca338ccf..a57b08ece7cf3e272b0d22eaacfb8f43abb2de76 100644 (file)
@@ -1,7 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_LAPACK)
   DEAL_II_PICKUP_TESTS()
 ENDIF()
index cc2a5e106c243c94eb240cf7bb30ffa6abcbf24a..616b94a3b4a4a3ba85cde7129b9dfcdb06c179b6 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 174b149b2b59272481e5e415b6b82175b34529f8..4bac44690ce1521ea9fbcb087310b96a700a2947 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.
 ##
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
+
+#
+# Set up test environment (does not pick up anything):
+#
+DEAL_II_PICKUP_TESTS()
 
 #
 # Tests for the mesh_converter executable
index 45b58a662c49e7066e998486f214370be8ded9b1..37c3ae108d5a0a5a70999dfe8383d94469a6c229 100644 (file)
@@ -1,7 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_METIS)
   DEAL_II_PICKUP_TESTS()
 ENDIF()
index 7726db808c095f759e2ff54ae3b69a0514c4a53d..bd0697dbb7c1252685b94dbdea4273a0c00ae8c1 100644 (file)
@@ -1,7 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_MPI AND DEAL_II_WITH_P4EST)
   DEAL_II_PICKUP_TESTS()
 ENDIF()
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index f759a1d939458da5c0f037506fed72115badf0b1..e586a5e3651a09580d14889fa083a6b054829d19 100644 (file)
@@ -1,7 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_OPENCASCADE)
   DEAL_II_PICKUP_TESTS()
 ENDIF()
index f68f8d28a196d206c416ddbdb278f7e4d5ab66f0..e04dc4b2d63e76f372af270fd580a55a1455a291 100644 (file)
@@ -1,7 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_PETSC)
   DEAL_II_PICKUP_TESTS()
 ENDIF()
index 0b20ef4e0b541d0b7c47be2819b9b040c5b3df77..bd1bc1e3323e9e70b7b1b8707bc7589b1559fa46 100644 (file)
@@ -1,5 +1,4 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 4488e3d4af138bf960a63ed8f9e70deaa0dd73ef..ca24918939acb3b7dccdf4efa1c1aecff2b19676 100644 (file)
-## ---------------------------------------------------------------------
-##
-## Copyright (C) 2013 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.
-##
-## ---------------------------------------------------------------------
-
-#
-# Setup necessary configuration in the testsuite subprojects.
-# This file is directly included by the test subprojects and not by the
-# main project.
-#
-# It is assumed that the following variables are set:
-#
-#    DEAL_II_BINARY_DIR
-#    DEAL_II_SOURCE_DIR
-#      - pointing to a source and binary directory of a deal.II build
-#
-# This file sets up the following options, that can be overwritten by
-# environment or command line:
-#
-#     TEST_DIFF
-#     TEST_PICKUP_REGEX
-#     TEST_TIME_LIMIT
-#
+FIND_PACKAGE(deal.II 8.0 REQUIRED HINTS ${DEAL_II_DIR})
+SET(CMAKE_CXX_COMPILER ${DEAL_II_CXX_COMPILER} CACHE STRING "CXX Compiler.")
 
 #
 # Silence warnings:
 #
-FOREACH(_var
-    MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_POSTFLAGS MPIEXEC_PREFLAGS
-    )
+FOREACH(_var MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_POSTFLAGS MPIEXEC_PREFLAGS)
   SET(${_var} ${${_var}})
 ENDFOREACH()
 
-#
-# Load all macros:
-#
-FILE(GLOB _macro_files ${DEAL_II_SOURCE_DIR}/cmake/macros/*.cmake)
-FOREACH(_file ${_macro_files})
-  INCLUDE(${_file})
-ENDFOREACH()
-
-#
-# Pick up values from environment:
-#
-FOREACH(_var
-  DEAL_II_BINARY_DIR
-  DEAL_II_SOURCE_DIR
-  TEST_DIFF
-  TEST_TIME_LIMIT
-  TEST_PICKUP_REGEX
-  )
-  IF(DEFINED ENV{${_var}})
-    SET(${_var} $ENV{${_var}})
-  ENDIF()
-  IF(NOT "${${_var}}" STREQUAL "")
-    SET(${_var} "${${_var}}" CACHE STRING "" FORCE)
-  ENDIF()
-ENDFOREACH()
-
-#
-# We need deal.II and Perl as external packages:
-#
-
-FIND_PACKAGE(deal.II 8.0 REQUIRED
-  HINTS ${DEAL_II_BINARY_DIR} ${DEAL_II_DIR}
-  )
-SET(CMAKE_CXX_COMPILER ${DEAL_II_CXX_COMPILER} CACHE STRING "CXX Compiler.")
-
-FIND_PACKAGE(Perl REQUIRED)
-
-#
-# We need a diff tool, preferably numdiff:
-#
-
-FIND_PROGRAM(DIFF_EXECUTABLE
-  NAMES diff
-  HINTS ${DIFF_DIR}
-  PATH_SUFFIXES bin
-  )
-
-FIND_PROGRAM(NUMDIFF_EXECUTABLE
-  NAMES numdiff
-  HINTS ${NUMDIFF_DIR}
-  PATH_SUFFIXES bin
-  )
-
-MARK_AS_ADVANCED(DIFF_EXECUTABLE NUMDIFF_EXECUTABLE)
-
-IF("${TEST_DIFF}" STREQUAL "")
-  #
-  # No TEST_DIFF is set, specify one:
-  #
-
-  IF(NOT NUMDIFF_EXECUTABLE MATCHES "-NOTFOUND")
-    SET(TEST_DIFF ${NUMDIFF_EXECUTABLE} -a 1e-6 -r 1e-8 -s ' \\t\\n:<>=,;')
-    IF(DIFF_EXECUTABLE MATCHES "-NOTFOUND")
-      SET(DIFF_EXECUTABLE ${NUMDIFF_EXECUTABLE})
-    ENDIF()
-  ELSEIF(NOT DIFF_EXECUTABLE MATCHES "-NOTFOUND")
-    SET(TEST_DIFF ${DIFF_EXECUTABLE})
-  ELSE()
-    MESSAGE(FATAL_ERROR
-      "Could not find diff or numdiff. One of those are required for running the testsuite.\n"
-      "Please specify TEST_DIFF by hand."
-      )
-  ENDIF()
-ENDIF()
-
-#
-# Set a default time limit of 600 seconds:
-#
-
-SET_IF_EMPTY(TEST_TIME_LIMIT 600)
-
-#
-# And finally, enable testing:
-#
-
-ENABLE_TESTING()
-
 #
 # A custom target that does absolutely nothing. It is used in the main
 # project to trigger a "make rebuild_cache" if necessary.
 #
-
 ADD_CUSTOM_TARGET(regenerate)
index 96df21c6f78e6d29cec17d75aa4a5a0c401a1dda..209690137c889b18aff075e46e299fb8cfb8ca7d 100644 (file)
@@ -1,7 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF((DEAL_II_WITH_PETSC) AND (DEAL_II_WITH_SLEPC))
   DEAL_II_PICKUP_TESTS()
 ENDIF()
index c7819bf6f26bc70b97e339e961cd603e9d480781..4a33afc68670325a1728139965b5c56f6c30fb9b 100644 (file)
@@ -1,7 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_TRILINOS)
   DEAL_II_PICKUP_TESTS()
 ENDIF()
index 1d50186b0d05c20a0294ead298a193a6509efdef..538a3c32c1f8ecf9f25c1e053107de287c492738 100644 (file)
@@ -1,7 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_UMFPACK)
   DEAL_II_PICKUP_TESTS()
 ENDIF()

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.