From cee08ad942709b9aebe2f6bab688ed14d3cfe869 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 13 Sep 2013 15:16:26 +0000 Subject: [PATCH] Cleanup CMake script files git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30689 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/setup_testsuite.cmake | 70 +++++++++++++++++++++++++++ tests/CMakeLists.txt | 75 +++++++---------------------- tests/all-headers/CMakeLists.txt | 17 +++++++ 3 files changed, 104 insertions(+), 58 deletions(-) create mode 100644 deal.II/cmake/setup_testsuite.cmake diff --git a/deal.II/cmake/setup_testsuite.cmake b/deal.II/cmake/setup_testsuite.cmake new file mode 100644 index 0000000000..2e9300f5d4 --- /dev/null +++ b/deal.II/cmake/setup_testsuite.cmake @@ -0,0 +1,70 @@ +## --------------------------------------------------------------------- +## $Id$ +## +## 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 testsuite: +# +# TODO: Describe and document the following: +# +# TEST_DIFF +# TEST_TIME_LIMIT +# NUMDIFF_DIR +# + +# +# We need perl for the testsuite: +# + +FIND_PACKAGE(Perl) +IF(NOT PERL_FOUND) + MESSAGE(FATAL_ERROR + "Could not find a perl installation which is required for running the test suite" + ) +ENDIF() + +# +# And a diff tool, preferably numdiff: +# + +FIND_PROGRAM(NUMDIFF_EXECUTABLE + NAMES numdiff + HINTS ${NUMDIFF_DIR} + PATH_SUFFIXES bin + ) +FIND_PROGRAM(DIFF_EXECUTABLE + NAMES diff + ) +IF( NUMDIFF_EXECUTABLE MATCHES "-NOTFOUND" + AND DIFF_EXECUTABLE MATCHES "-NOTFOUND" ) + MESSAGE(FATAL_ERROR + "Could not find diff or numdiff. One of those are required for running the testsuite." + ) +ENDIF() + +IF(NOT NUMDIFF_EXECUTABLE MATCHES "-NOTFOUND") + SET_IF_EMPTY(TEST_DIFF ${NUMDIFF_EXECUTABLE} -a 1e-6 -q -s ' \t\n:') +ELSE() + SET_IF_EMPTY(TEST_DIFF ${DIFF_EXECUTABLE}) +ENDIF() + +MARK_AS_ADVANCED(DIFF_EXECUTABLE NUMDIFF_EXECUTABLE) + +# +# Set a default time limit of 60 seconds: +# + +SET_IF_EMPTY(TEST_TIME_LIMIT 120) + diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ba41e5bd9c..a7e3ef3601 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -17,53 +17,8 @@ # # Setup and run the testsuite: # -# TODO: Describe and document the following: -# TEST_DIFF -# TEST_TIME_LIMIT -# NUMDIFF_DIR -# - -# -# We need perl for the testsuite: -# -FIND_PACKAGE(Perl) -IF(NOT PERL_FOUND) - MESSAGE(FATAL_ERROR - "Could not find a perl installation which is required for running the test suite" - ) -ENDIF() - -# -# And a diff tool, preferably numdiff: -# -FIND_PROGRAM(NUMDIFF_EXECUTABLE - NAMES numdiff - HINTS ${NUMDIFF_DIR} - PATH_SUFFIXES bin - ) -FIND_PROGRAM(DIFF_EXECUTABLE - NAMES diff - ) -IF( NUMDIFF_EXECUTABLE MATCHES "-NOTFOUND" - AND DIFF_EXECUTABLE MATCHES "-NOTFOUND" ) - MESSAGE(FATAL_ERROR - "Could not find diff or numdiff. One of those are required for running the testsuite." - ) -ENDIF() - -IF(NOT NUMDIFF_EXECUTABLE MATCHES "-NOTFOUND") - SET_IF_EMPTY(TEST_DIFF ${NUMDIFF_EXECUTABLE} -a 1e-6 -q -s ' \t\n:') -ELSE() - SET_IF_EMPTY(TEST_DIFF ${DIFF_EXECUTABLE}) -ENDIF() - -MARK_AS_ADVANCED(DIFF_EXECUTABLE NUMDIFF_EXECUTABLE) - -# -# Set a default time limit of 60 seconds: -# -SET_IF_EMPTY(TEST_TIME_LIMIT 120) +INCLUDE(setup_testsuite) MESSAGE(STATUS "Proceed to test definitions") @@ -74,39 +29,42 @@ ADD_SUBDIRECTORY(base) ADD_SUBDIRECTORY(bits) ADD_SUBDIRECTORY(codim_one) ADD_SUBDIRECTORY(deal.II) + +IF(DEAL_II_WITH_P4EST) + ADD_SUBDIRECTORY(distributed_grids) +ENDIF() + #ADD_SUBDIRECTORY(fail) -- the good old failing tests + ADD_SUBDIRECTORY(fe) ADD_SUBDIRECTORY(grid) ADD_SUBDIRECTORY(hp) ADD_SUBDIRECTORY(integrators) ADD_SUBDIRECTORY(lac) -ADD_SUBDIRECTORY(matrix_free) -ADD_SUBDIRECTORY(multigrid) -ADD_SUBDIRECTORY(serialization) - -# These two are a little bit special -#benchmarks -#mesh_converter - -#gla - WITH_MPI, ?? WITH_P4EST ?? -#mpi - WITH_MPI IF(DEAL_II_WITH_LAPACK) ADD_SUBDIRECTORY(lapack) ENDIF() +ADD_SUBDIRECTORY(matrix_free) + IF(DEAL_II_WITH_METIS) ADD_SUBDIRECTORY(metis) ENDIF() -IF(DEAL_II_WITH_P4EST) - ADD_SUBDIRECTORY(distributed_grids) +IF(DEAL_II_WITH_MPI AND DEAL_II_WITH_P4EST) + ADD_SUBDIRECTORY(gla) + ADD_SUBDIRECTORY(mpi) ENDIF() +ADD_SUBDIRECTORY(multigrid) + IF(DEAL_II_WITH_PETSC) ADD_SUBDIRECTORY(petsc) ENDIF() +ADD_SUBDIRECTORY(serialization) + IF(DEAL_II_WITH_SLEPC) ADD_SUBDIRECTORY(slepc) ENDIF() @@ -118,3 +76,4 @@ ENDIF() IF(DEAL_II_WITH_UMFPACK) ADD_SUBDIRECTORY(umfpack) ENDIF() + diff --git a/tests/all-headers/CMakeLists.txt b/tests/all-headers/CMakeLists.txt index 48c38fcce7..5ab714797b 100644 --- a/tests/all-headers/CMakeLists.txt +++ b/tests/all-headers/CMakeLists.txt @@ -1,3 +1,19 @@ +## --------------------------------------------------------------------- +## $Id$ +## +## 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. +## +## --------------------------------------------------------------------- + # # Header tests are special: # @@ -5,6 +21,7 @@ # to compile a simple worker (test_header.cc) that only includes the given # header file. We omit linking to safe some time. # + SET(_category all-headers) FILE(GLOB_RECURSE _header -- 2.39.5