]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
First commit (tm)
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 18 Aug 2013 21:08:11 +0000 (21:08 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 18 Aug 2013 21:08:11 +0000 (21:08 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30337 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/cmake/macros/macro_deal_ii_add_test.cmake [new file with mode: 0644]
deal.II/contrib/CMakeLists.txt
deal.II/contrib/test_affinity/CMakeLists.txt [deleted file]
deal.II/tests_tmp/threads/affinity.cc [moved from deal.II/contrib/test_affinity/test_affinity.cc with 100% similarity]
tests/CMakeLists.txt
tests/base/CMakeLists.txt [new file with mode: 0644]
tests/bits/CMakeLists.txt [new file with mode: 0644]
tests/fe/CMakeLists.txt [new file with mode: 0644]

index 714613a8c7f85a71fb7ba5a089abfda27301942d..c7f0ab92d4833cc46c6ef9b5e8231fa6ef2bc3b6 100644 (file)
@@ -146,7 +146,7 @@ ADD_SUBDIRECTORY(contrib) # has to be included after source
 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()
 
 #
diff --git a/deal.II/cmake/macros/macro_deal_ii_add_test.cmake b/deal.II/cmake/macros/macro_deal_ii_add_test.cmake
new file mode 100644 (file)
index 0000000..d19ca77
--- /dev/null
@@ -0,0 +1,52 @@
+## ---------------------------------------------------------------------
+## $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()
index f507b519ebb5fed97dea9d097298cb690646a22e..6e92950efaaebe5631c5d8101b9ae9e93cd83c36 100644 (file)
@@ -22,5 +22,3 @@ IF(DEAL_II_COMPONENT_PARAMETER_GUI)
   ADD_SUBDIRECTORY(parameter_gui)
 ENDIF()
 
-#ADD_SUBDIRECTORY(test_affinity)
-
diff --git a/deal.II/contrib/test_affinity/CMakeLists.txt b/deal.II/contrib/test_affinity/CMakeLists.txt
deleted file mode 100644 (file)
index 8307515..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-## ---------------------------------------------------------------------
-## $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()
index dcca0f909d08a637d1659abc4276b9c3dd482716..21aa49c9259d6b3d2be210dea37575ac0a932da3 100644 (file)
@@ -1 +1,5 @@
-ADD_CUSTOM_TARGET(foobar)
+MESSAGE(STATUS "Registering tests")
+ADD_SUBDIRECTORY(base)
+ADD_SUBDIRECTORY(bits)
+ADD_SUBDIRECTORY(fe)
+MESSAGE(STATUS "Tests")
diff --git a/tests/base/CMakeLists.txt b/tests/base/CMakeLists.txt
new file mode 100644 (file)
index 0000000..34c42d8
--- /dev/null
@@ -0,0 +1,8 @@
+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()
diff --git a/tests/bits/CMakeLists.txt b/tests/bits/CMakeLists.txt
new file mode 100644 (file)
index 0000000..34c42d8
--- /dev/null
@@ -0,0 +1,8 @@
+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()
diff --git a/tests/fe/CMakeLists.txt b/tests/fe/CMakeLists.txt
new file mode 100644 (file)
index 0000000..34c42d8
--- /dev/null
@@ -0,0 +1,8 @@
+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()

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.