diff --git a/CMake/mitkFunctionAddTestLabel.cmake b/CMake/mitkFunctionAddTestLabel.cmake new file mode 100644 index 0000000000..1274b63cad --- /dev/null +++ b/CMake/mitkFunctionAddTestLabel.cmake @@ -0,0 +1,15 @@ +# +# Use to attach a CTest/CDash label to a test (already added via ADD_TEST) +# +# Call with or without an explicit second parameter. If no second parameter is given, +# ${MITK_DEFAULT_SUBPROJECTS} will be used as standard label +# +function(mitkFunctionAddTestLabel test_name) + set(label ${MITK_DEFAULT_SUBPROJECTS}) + if (ARGN) + set(label ${ARGN}) + endif() + set_property(TEST ${test_name} APPEND PROPERTY LABELS ${label}) +endfunction(add_test_label) + +