.. _dune_declare_test_label:

dune_declare_test_label
=======================

.. cmake_function:: dune_declare_test_label

   .. cmake_brief::

      Declare labels for :ref:`dune_add_test`.

   .. cmake_param:: LABELS
      :multi:

      The names of labels to declare.  Label names must be nonempty and
      consist only of alphanumeric characters plus :code:`-` and :code:`_`
      to make sure it is easy to construct regular expressions from them for
      :code:`ctest -L ${label_regex}`.

   Labels need to be declared to ensure that the target
   :code:`build_${label}_tests` exists.  They will normally be declared
   on-demand by :ref:`dune_add_test`.  But sometimes it is useful to be able to
   run :code:`make build_${label}_tests` whether or not any tests with that
   label exists in a module.  For these cases :ref:`dune_declare_test_label` can
   be called explicitly.

   The label :code:`quick` is always predeclared.

