ADD_SUBDIRECTORY(examples)
IF(DEAL_II_HAVE_TESTS_DIRECTORY)
- ADD_SUBDIRECTORY(${TEST_DIR} ${CMAKE_BINARY_DIR}/tests)
+ ADD_SUBDIRECTORY(${TEST_DIR} ${CMAKE_BINARY_DIR}/tests_ext)
ENDIF()
#
--- /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.
+##
+## ---------------------------------------------------------------------
+
+#
+# Usage:
+# DEAL_II_ADD_TEST(category test_name [configurations])
+#
+
+MACRO(DEAL_II_ADD_TEST _category _test_target)
+
+ FOREACH(_build ${DEAL_II_BUILD_TYPES})
+
+ ITEM_MATCHES(_match "${_build}" ${ARGN})
+ IF(_match OR "${ARGN}" STREQUAL "")
+
+ STRING(TOLOWER ${_build} _build_lowercase)
+ ADD_EXECUTABLE(${_test_target}.${_build_lowercase}
+ ${_test_target}.cc
+ )
+ SET_TARGET_PROPERTIES(${_test_target}.${_build_lowercase} PROPERTIES
+ LINK_FLAGS "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}"
+ COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
+ COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${_build}}"
+ LINKER_LANGUAGE "CXX"
+ )
+ SET_PROPERTY(TARGET ${_target} APPEND PROPERTY
+ INCLUDE_DIRECTORIES
+ "${CMAKE_BINARY_DIR}/include"
+ "${CMAKE_SOURCE_DIR}/include"
+ )
+
+ TARGET_LINK_LIBRARIES(${_test_target}.${_build_lowercase}
+ ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}
+ )
+ ENDIF()
+
+ ENDFOREACH()
+
+ENDMACRO()
ADD_SUBDIRECTORY(parameter_gui)
ENDIF()
-#ADD_SUBDIRECTORY(test_affinity)
-
+++ /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.
-##
-## ---------------------------------------------------------------------
-
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
-
-INCLUDE_DIRECTORIES(
- BEFORE
- ${CMAKE_SOURCE_DIR}/include/
- ${CMAKE_BINARY_DIR}/include/
- )
-
-ADD_EXECUTABLE(test_affinity
- test_affinity.cc
- )
-
-IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- SET(_build "DEBUG")
-ELSE()
- SET(_build "RELEASE")
-ENDIF()
-
-SET_TARGET_PROPERTIES(test_affinity PROPERTIES
- LINK_FLAGS "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}"
- COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
- COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${_build}}"
- LINKER_LANGUAGE "CXX"
- )
-
-TARGET_LINK_LIBRARIES(test_affinity ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX})
-
-IF(NOT CMAKE_CROSSCOMPILING)
- ADD_CUSTOM_TARGET(run_test_affinity COMMAND test_affinity)
-ENDIF()
-ADD_CUSTOM_TARGET(foobar)
+MESSAGE(STATUS "Registering tests")
+ADD_SUBDIRECTORY(base)
+ADD_SUBDIRECTORY(bits)
+ADD_SUBDIRECTORY(fe)
+MESSAGE(STATUS "Tests")
--- /dev/null
+GET_FILENAME_COMPONENT(_category ${CMAKE_CURRENT_SOURCE_DIR} NAME)
+
+FILE(GLOB _tests "*.cc")
+
+FOREACH(_test ${_tests})
+ GET_FILENAME_COMPONENT(_test ${_test} NAME_WE)
+ DEAL_II_ADD_TEST(${_category} ${_test})
+ENDFOREACH()
--- /dev/null
+GET_FILENAME_COMPONENT(_category ${CMAKE_CURRENT_SOURCE_DIR} NAME)
+
+FILE(GLOB _tests "*.cc")
+
+FOREACH(_test ${_tests})
+ GET_FILENAME_COMPONENT(_test ${_test} NAME_WE)
+ DEAL_II_ADD_TEST(${_category} ${_test})
+ENDFOREACH()
--- /dev/null
+GET_FILENAME_COMPONENT(_category ${CMAKE_CURRENT_SOURCE_DIR} NAME)
+
+FILE(GLOB _tests "*.cc")
+
+FOREACH(_test ${_tests})
+ GET_FILENAME_COMPONENT(_test ${_test} NAME_WE)
+ DEAL_II_ADD_TEST(${_category} ${_test})
+ENDFOREACH()