]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Also respect TEST_PICKUP_REGEX for the all-header tests
authorMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 5 Sep 2013 16:23:15 +0000 (16:23 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 5 Sep 2013 16:23:15 +0000 (16:23 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30612 0785d39b-7218-0410-832d-ea1e28bc413d

tests/all-headers/CMakeLists.txt

index 2288492ea42915b0dc910e2699bf74944967abc7..261555f951365cee83c7dd6d25fd747f1615d7f7 100644 (file)
@@ -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=<deal.II/${_path}/${_file}>
-      )
+    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=<deal.II/${_path}/${_file}>
+        )
+
+      #
+      # 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()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.