## ---------------------------------------------------------------------
#
-# A macro to set up testing and pick up all tests in a test subdirectory.
+# A macro to set up testing and pick up all tests in the current
+# subdirectory.
#
# If TEST_PICKUP_REGEX is set, only tests matching the regex will be
# processed.
# command line:
#
# TEST_DIFF
+# - specifying the executable and command line of the diff command to
+# use
+#
+# TEST_LIBRARIES
+# TEST_LIBRARIES_DEBUG
+# TEST_LIBRARIES_RELEASE
+# - specifying additional libraries (and targets) to link against.
+#
# TEST_TIME_LIMIT
-# TEST_PICKUP_REGEX
+# - specifying the maximal wall clock time in seconds a test is
+# allowed to run
#
# Usage:
# DEAL_II_PICKUP_TESTS()
#
-# Used in DEAL_II_PICKUP_TESTS
+# Two very small macros that are used below:
#
+
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})
)
ENDIF()
- IF(NOT DEAL_II_TARGET_CONFIG_INCLUDED)
- INCLUDE(${DEAL_II_TARGET_CONFIG})
- SET(DEAL_II_TARGET_CONFIG_INCLUDED TRUE)
- ENDIF()
-
#
# We need perl:
#
ADD_LIBRARY(${_target} OBJECT EXCLUDE_FROM_ALL test_header.cc
${CMAKE_CURRENT_BINARY_DIR}/${_target}_interrupt_guard.cc
)
-
- SET_TARGET_PROPERTIES(${_target} PROPERTIES
- LINK_FLAGS "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}"
- COMPILE_DEFINITIONS "${DEAL_II_USER_DEFINITIONS};${DEAL_II_USER_DEFINITIONS_${_build}}"
- COMPILE_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
- )
- SET_PROPERTY(TARGET ${_target} APPEND PROPERTY
- INCLUDE_DIRECTORIES "${DEAL_II_INCLUDE_DIRS}"
- )
+ DEAL_II_SETUP_TARGET(${_target} ${_build})
SET_PROPERTY(TARGET ${_target} APPEND PROPERTY
COMPILE_DEFINITIONS HEADER=<deal.II/${_header}>
)
FILE(GLOB _files ${_step_full}/*)
SET(_command)
FOREACH(_file ${_files})
- IF(NOT _file MATCHES "/(CMakeCache.txt|CMakeFiles|doc|.svn)")
+ IF(NOT _file MATCHES "/(CMakeCache.txt|CMakeFiles|doc)")
LIST(APPEND _command
COMMAND ${CMAKE_COMMAND} -E copy ${_file} ${_step_dir}
)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake)
PROJECT(testsuite CXX)
-IF((DEAL_II_WITH_PETSC) AND (DEAL_II_WITH_SLEPC))
+IF(DEAL_II_WITH_PETSC AND DEAL_II_WITH_SLEPC)
DEAL_II_PICKUP_TESTS()
ENDIF()