From: Matthias Maier Date: Thu, 5 Sep 2013 16:23:15 +0000 (+0000) Subject: Also respect TEST_PICKUP_REGEX for the all-header tests X-Git-Tag: v8.1.0~570^2~371 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdeb07cf8b1f55470e88e0a48712ad3dae8e9cbd;p=dealii.git Also respect TEST_PICKUP_REGEX for the all-header tests git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30612 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/all-headers/CMakeLists.txt b/tests/all-headers/CMakeLists.txt index 2288492ea4..261555f951 100644 --- a/tests/all-headers/CMakeLists.txt +++ b/tests/all-headers/CMakeLists.txt @@ -12,6 +12,7 @@ FILE(GLOB_RECURSE _header ) FOREACH(_full_file ${_header}) + GET_FILENAME_COMPONENT(_file ${_full_file} NAME) # TODO: A more sophisticated way to get the relative include path: @@ -27,37 +28,44 @@ FOREACH(_full_file ${_header}) SET(_test ${_category}-${_path}-${_file}.${_build_lowercase}) # - # Add an object library for each header file and build configuration: + # Respect TEST_PICKUP_REGEX: # - ADD_LIBRARY(${_test} OBJECT EXCLUDE_FROM_ALL test_header.cc) - SET_TARGET_PROPERTIES(${_test} PROPERTIES - COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}" - COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${_build}}" - ) - SET_PROPERTY(TARGET ${_test} APPEND PROPERTY - INCLUDE_DIRECTORIES - "${CMAKE_BINARY_DIR}/include" - "${CMAKE_SOURCE_DIR}/include" - "${CMAKE_SOURCE_DIR}/include/deal.II/" - ) - SET_PROPERTY(TARGET ${_test} APPEND PROPERTY - COMPILE_DEFINITIONS - HEADER= - ) + IF( "${TEST_PICKUP_REGEX}" STREQUAL "" OR + _test MATCHES "${TEST_PICKUP_REGEX}" ) - # - # And finally add the test: - # - ADD_TEST(NAME ${_category}/${_path}/${_file}.${_build_lowercase} - COMMAND ${CMAKE_COMMAND} - -DTEST=${_test} - -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR} - -P ${CMAKE_SOURCE_DIR}/cmake/scripts/run_test.cmake - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - SET_TESTS_PROPERTIES(${_category}/${_path}/${_file}.${_build_lowercase} PROPERTIES - LABEL "${_category}" - TIMEOUT ${TEST_TIME_LIMIT} - ) + # + # Add an object library for each header file and build configuration: + # + ADD_LIBRARY(${_test} OBJECT EXCLUDE_FROM_ALL test_header.cc) + SET_TARGET_PROPERTIES(${_test} PROPERTIES + COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}" + COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${_build}}" + ) + SET_PROPERTY(TARGET ${_test} APPEND PROPERTY + INCLUDE_DIRECTORIES + "${CMAKE_BINARY_DIR}/include" + "${CMAKE_SOURCE_DIR}/include" + "${CMAKE_SOURCE_DIR}/include/deal.II/" + ) + SET_PROPERTY(TARGET ${_test} APPEND PROPERTY + COMPILE_DEFINITIONS + HEADER= + ) + + # + # And finally add the test: + # + ADD_TEST(NAME ${_category}/${_path}/${_file}.${_build_lowercase} + COMMAND ${CMAKE_COMMAND} + -DTEST=${_test} + -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR} + -P ${CMAKE_SOURCE_DIR}/cmake/scripts/run_test.cmake + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + SET_TESTS_PROPERTIES(${_category}/${_path}/${_file}.${_build_lowercase} PROPERTIES + LABEL "${_category}" + TIMEOUT ${TEST_TIME_LIMIT} + ) + ENDIF() ENDFOREACH() ENDFOREACH()