From bb812de343e01a886f52f2a6d234af0be9360cc8 Mon Sep 17 00:00:00 2001 From: maier Date: Thu, 5 Sep 2013 16:23:15 +0000 Subject: [PATCH] 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 --- tests/all-headers/CMakeLists.txt | 68 ++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 30 deletions(-) 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() -- 2.39.5