)
+ SET(_comparison ${CMAKE_CURRENT_SOURCE_DIR}/${_test_name})
+ IF(EXISTS ${_comparison}.${_build_lowercase}.output)
+ SET(_comparison ${_comparison}.${_build_lowercase}.output)
+ ELSE()
+ SET(_comparison ${_comparison}.output)
+ ENDIF()
+
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_test}/diff
COMMAND ${DEAL_II_TEST_DIFF}
${CMAKE_CURRENT_BINARY_DIR}/${_test}/output
- ${CMAKE_CURRENT_SOURCE_DIR}/${_test_name}.output
+ ${_comparison}
| tee ${CMAKE_CURRENT_BINARY_DIR}/${_test}/diff
DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/${_test}/output
- ${CMAKE_CURRENT_SOURCE_DIR}/${_test_name}.output
+ ${_comparison}
)
ADD_CUSTOM_TARGET(${_test}.diff
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_test}/diff
--- /dev/null
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2013 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+#
+# A Macro to pick up all tests in a test subdirectory
+#
+# Usage:
+# DEAL_II_PICKUP_TESTS()
+#
+
+MACRO(DEAL_II_PICKUP_TESTS)
+ GET_FILENAME_COMPONENT(_category ${CMAKE_CURRENT_SOURCE_DIR} NAME)
+
+ FILE(GLOB _tests "*.output")
+
+ FOREACH(_test ${_tests})
+
+ GET_FILENAME_COMPONENT(_test ${_test} NAME_WE)
+
+ IF(_test MATCHES debug)
+ SET(_configuration DEBUG)
+ ELSEIF(_test MATCHES release)
+ SET(_configuration RELEASE)
+ ELSE()
+ SET(_configuration)
+ ENDIF()
+
+ STRING(REGEX REPLACE "\\..*" "." _test ${_test})
+ DEAL_II_ADD_TEST(${_category} ${_test} ${_configuration})
+ ENDFOREACH()
+ENDMACRO()
-GET_FILENAME_COMPONENT(_category ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-
-FILE(GLOB _tests "*.output")
-
-FOREACH(_test ${_tests})
- GET_FILENAME_COMPONENT(_test ${_test} NAME_WE)
- DEAL_II_ADD_TEST(${_category} ${_test})
-ENDFOREACH()
+DEAL_II_PICKUP_TESTS()
-GET_FILENAME_COMPONENT(_category ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-
-FILE(GLOB _tests "*.output")
-
-FOREACH(_test ${_tests})
- GET_FILENAME_COMPONENT(_test ${_test} NAME_WE)
- DEAL_II_ADD_TEST(${_category} ${_test})
-ENDFOREACH()
+DEAL_II_PICKUP_TESTS()