# additional threads. The special value 0 enforces no limit. Defaults
# to 0.
#
+# ENABLE_PERFORMANCE_TESTS
+# - If defined and set to true the execution of performance tests will
+# be enabled.
+#
+# TESTING_ENVIRONMENT
+# - Specifies the performance test testing environment. Valid options
+# are:
+# * "light": mobile laptop, >=2 physical cores, >=8GB RAM
+# * "medium": workstation, >=8 physical cores, >=32GB RAM
+# * "heavy": compute node, >=32 physical cores, >=128GB RAM
+#
# Usage:
# DEAL_II_ADD_TEST(category test_name comparison_file)
#
ENDIF()
ENDFOREACH()
+ IF(NOT TESTING_ENVIRONMENT MATCHES "^(light|medium|heavy)$")
+ MESSAGE(FATAL_ERROR
+ "The TESTING_ENVIRONMENT variable must be set to either \"light\","
+ " \"medium\", or \"heavy\"."
+ )
+ ENDIF()
+
FOREACH(_build ${_build_types})
#
)
SET_PROPERTY(TARGET ${_target} APPEND PROPERTY
- COMPILE_DEFINITIONS SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}"
+ COMPILE_DEFINITIONS
+ SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}"
+ TESTING_ENVIRONMENT=${TESTING_ENVIRONMENT}
)
+
+ IF(ENABLE_PERFORMANCE_TESTS)
+ SET_PROPERTY(TARGET ${_target} APPEND PROPERTY
+ COMPILE_DEFINITIONS ENABLE_PERFORMANCE_TESTS
+ )
+ ENDIF()
+
SET_PROPERTY(TARGET ${_target} PROPERTY
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${_target_short}"
)
# - A regular expression to select only a subset of tests during setup.
# An empty string is interpreted as a catchall (this is the default).
#
+# ENABLE_PERFORMANCE_TESTS
+# - If defined and set to true the execution of performance tests
+# will be enabled.
+#
+# TESTING_ENVIRONMENT
+# - Specifies the performance test testing environment. Valid options
+# are:
+# * "light": mobile laptop, >=2 physical cores, >=8GB RAM
+# * "medium": workstation, >=8 physical cores, >=32GB RAM
+# * "heavy": compute node, >=32 physical cores, >=128GB RAM
+#
# numdiff is used for the comparison of test results. Its location can be
# specified with NUMDIFF_DIR.
#
SET_IF_EMPTY(TEST_THREAD_LIMIT "$ENV{TEST_THREAD_LIMIT}")
SET_IF_EMPTY(TEST_THREAD_LIMIT 0)
+ #
+ # Other variables:
+ #
+
+ SET_IF_EMPTY(TEST_PICKUP_REGEX "$ENV{TEST_PICKUP_REGEX}")
+
+ SET_IF_EMPTY(ENABLE_PERFORMANCE_TESTS "$ENV{ENABLE_PERFORMANCE_TESTS}")
+
+ SET_IF_EMPTY(TESTING_ENVIRONMENT "$ENV{TESTING_ENVIRONMENT}")
+ SET_IF_EMPTY(TESTING_ENVIRONMENT "light")
+
#
# ... and finally pick up tests:
#
ENABLE_TESTING()
- SET_IF_EMPTY(TEST_PICKUP_REGEX "$ENV{TEST_PICKUP_REGEX}")
-
IF("${ARGN}" STREQUAL "")
GET_FILENAME_COMPONENT(_category ${CMAKE_CURRENT_SOURCE_DIR} NAME)
ELSE()
#
# Always undefine the following variables in the setup_tests target:
#
-FOREACH(_var DIFF_DIR NUMDIFF_DIR TEST_PICKUP_REGEX TEST_TIME_LIMIT TEST_MPI_RANK_LIMIT TEST_THREAD_LIMIT)
+FOREACH(_var
+ DIFF_DIR NUMDIFF_DIR TEST_PICKUP_REGEX TEST_TIME_LIMIT
+ TEST_MPI_RANK_LIMIT TEST_THREAD_LIMIT ENABLE_PERFORMANCE_TESTS
+ TESTING_ENVIRONMENT
+ )
LIST(APPEND _options "-U${_var}")
IF(NOT "${${_var}}" STREQUAL "")
LIST(APPEND _options "-D${_var}=${${_var}}")
SET(CMAKE_BUILD_TYPE ${DEAL_II_BUILD_TYPE} CACHE STRING "" FORCE)
DEAL_II_INITIALIZE_CACHED_VARIABLES()
-FOREACH(_var DIFF_DIR NUMDIFF_DIR TEST_PICKUP_REGEX TEST_TIME_LIMIT TEST_MPI_RANK_LIMIT TEST_THREAD_LIMIT)
+FOREACH(_var
+ DIFF_DIR NUMDIFF_DIR TEST_PICKUP_REGEX TEST_TIME_LIMIT
+ TEST_MPI_RANK_LIMIT TEST_THREAD_LIMIT ENABLE_PERFORMANCE_TESTS
+ TESTING_ENVIRONMENT
+ )
SET_IF_EMPTY(${_var} "$ENV{${_var}}")
SET(${_var} "${${_var}}" CACHE STRING "" FORCE)
ENDFOREACH()