From b596ce02034ad41411a0a3ed43aebb73ab7cf994 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 26 Mar 2015 18:15:45 +0100 Subject: [PATCH] Minor cleanup --- cmake/macros/macro_deal_ii_pickup_tests.cmake | 25 +++++++++++-------- tests/all-headers/CMakeLists.txt | 10 +------- tests/build_tests/CMakeLists.txt | 2 +- tests/slepc/CMakeLists.txt | 2 +- 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/cmake/macros/macro_deal_ii_pickup_tests.cmake b/cmake/macros/macro_deal_ii_pickup_tests.cmake index 397661f90e..0d7d3c9717 100644 --- a/cmake/macros/macro_deal_ii_pickup_tests.cmake +++ b/cmake/macros/macro_deal_ii_pickup_tests.cmake @@ -14,7 +14,8 @@ ## --------------------------------------------------------------------- # -# 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. @@ -24,8 +25,17 @@ # 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() @@ -33,17 +43,15 @@ # -# 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}) @@ -65,11 +73,6 @@ MACRO(DEAL_II_PICKUP_TESTS) ) ENDIF() - IF(NOT DEAL_II_TARGET_CONFIG_INCLUDED) - INCLUDE(${DEAL_II_TARGET_CONFIG}) - SET(DEAL_II_TARGET_CONFIG_INCLUDED TRUE) - ENDIF() - # # We need perl: # diff --git a/tests/all-headers/CMakeLists.txt b/tests/all-headers/CMakeLists.txt index 08533b7180..3d29a9bd4f 100644 --- a/tests/all-headers/CMakeLists.txt +++ b/tests/all-headers/CMakeLists.txt @@ -66,15 +66,7 @@ FOREACH(_header ${_headers}) 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= ) diff --git a/tests/build_tests/CMakeLists.txt b/tests/build_tests/CMakeLists.txt index 8279e6741a..718b570974 100644 --- a/tests/build_tests/CMakeLists.txt +++ b/tests/build_tests/CMakeLists.txt @@ -70,7 +70,7 @@ FOREACH(_step_full ${_steps}) 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} ) diff --git a/tests/slepc/CMakeLists.txt b/tests/slepc/CMakeLists.txt index 209690137c..121ac56e3b 100644 --- a/tests/slepc/CMakeLists.txt +++ b/tests/slepc/CMakeLists.txt @@ -1,6 +1,6 @@ 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() -- 2.39.5