aboutsummaryrefslogtreecommitdiff
path: root/modules/ECMAddTests.cmake
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2021-04-17 11:02:00 +0200
committerFriedrich W. H. Kossebau <kossebau@kde.org>2021-04-23 17:49:14 +0000
commit5512e03562694ebfe571a3b6068a7d35d9ddfd7a (patch)
tree3caca041d3526c8427ec3065642b41a52ad8578c /modules/ECMAddTests.cmake
parent38b5d046c4d42232d45bf4464167b2e6feea4cf7 (diff)
downloadextra-cmake-modules-5512e03562694ebfe571a3b6068a7d35d9ddfd7a.tar.gz
extra-cmake-modules-5512e03562694ebfe571a3b6068a7d35d9ddfd7a.tar.bz2
Modules docs: move rst docs into bracket comments
CMake >= 3.0 supports bracket comments, and the reStructuredText integration code in sphinx/ext/ecm.py already supports extracting the docs from a bracket comment instead. Editing documentation without leading line comment markers is more simple, e,g. when reflowing text over lines. With ECM meanwhile requiring CMake 3.5 now it is possible to switch (and thus follow also the approach used by cmake itself). NO_CHANGELOG
Diffstat (limited to 'modules/ECMAddTests.cmake')
-rw-r--r--modules/ECMAddTests.cmake110
1 files changed, 55 insertions, 55 deletions
diff --git a/modules/ECMAddTests.cmake b/modules/ECMAddTests.cmake
index 7e518212..de965f06 100644
--- a/modules/ECMAddTests.cmake
+++ b/modules/ECMAddTests.cmake
@@ -1,63 +1,63 @@
-#.rst:
-# ECMAddTests
-# -----------
-#
-# Convenience functions for adding tests.
-#
-# ::
-#
-# ecm_add_tests(<sources> LINK_LIBRARIES <library> [<library> [...]]
-# [NAME_PREFIX <prefix>]
-# [GUI]
-# [TARGET_NAMES_VAR <target_names_var>]
-# [TEST_NAMES_VAR <test_names_var>])
-#
-# A convenience function for adding multiple tests, each consisting of a
-# single source file. For each file in <sources>, an executable target will be
-# created (the name of which will be the basename of the source file). This
-# will be linked against the libraries given with LINK_LIBRARIES. Each
-# executable will be added as a test with the same name.
-#
-# If NAME_PREFIX is given, this prefix will be prepended to the test names, but
-# not the target names. As a result, it will not prevent clashes between tests
-# with the same name in different parts of the project, but it can be used to
-# give an indication of where to look for a failing test.
-#
-# If the flag GUI is passed the test binaries will be GUI executables, otherwise
-# the resulting binaries will be console applications (regardless of the value
-# of CMAKE_WIN32_EXECUTABLE or CMAKE_MACOSX_BUNDLE). Be aware that this changes
-# the executable entry point on Windows (although some frameworks, such as Qt,
-# abstract this difference away).
-#
-# The TARGET_NAMES_VAR and TEST_NAMES_VAR arguments, if given, should specify a
-# variable name to receive the list of generated target and test names,
-# respectively. This makes it convenient to apply properties to them as a
-# whole, for example, using set_target_properties() or set_tests_properties().
-#
-# The generated target executables will have the effects of ecm_mark_as_test()
-# (from the :module:`ECMMarkAsTest` module) applied to it.
-#
-# ::
-#
-# ecm_add_test(<sources> LINK_LIBRARIES <library> [<library> [...]]
-# [TEST_NAME <name>]
-# [NAME_PREFIX <prefix>]
-# [GUI])
-#
-# This is a single-test form of ecm_add_tests that allows multiple source files
-# to be used for a single test. If using multiple source files, TEST_NAME must
-# be given; this will be used for both the target and test names (and, as with
-# ecm_add_tests(), the NAME_PREFIX argument will be prepended to the test name).
-#
-#
-# Since pre-1.0.0.
-
-#=============================================================================
# SPDX-FileCopyrightText: 2013 Alexander Richardson <arichardson.kde@gmail.com>
# SPDX-FileCopyrightText: 2015 Alex Merry <alex.merry@kde.org>
#
# SPDX-License-Identifier: BSD-3-Clause
+#[=======================================================================[.rst:
+ECMAddTests
+-----------
+
+Convenience functions for adding tests.
+
+::
+
+ ecm_add_tests(<sources> LINK_LIBRARIES <library> [<library> [...]]
+ [NAME_PREFIX <prefix>]
+ [GUI]
+ [TARGET_NAMES_VAR <target_names_var>]
+ [TEST_NAMES_VAR <test_names_var>])
+
+A convenience function for adding multiple tests, each consisting of a
+single source file. For each file in <sources>, an executable target will be
+created (the name of which will be the basename of the source file). This
+will be linked against the libraries given with LINK_LIBRARIES. Each
+executable will be added as a test with the same name.
+
+If NAME_PREFIX is given, this prefix will be prepended to the test names, but
+not the target names. As a result, it will not prevent clashes between tests
+with the same name in different parts of the project, but it can be used to
+give an indication of where to look for a failing test.
+
+If the flag GUI is passed the test binaries will be GUI executables, otherwise
+the resulting binaries will be console applications (regardless of the value
+of CMAKE_WIN32_EXECUTABLE or CMAKE_MACOSX_BUNDLE). Be aware that this changes
+the executable entry point on Windows (although some frameworks, such as Qt,
+abstract this difference away).
+
+The TARGET_NAMES_VAR and TEST_NAMES_VAR arguments, if given, should specify a
+variable name to receive the list of generated target and test names,
+respectively. This makes it convenient to apply properties to them as a
+whole, for example, using set_target_properties() or set_tests_properties().
+
+The generated target executables will have the effects of ecm_mark_as_test()
+(from the :module:`ECMMarkAsTest` module) applied to it.
+
+::
+
+ ecm_add_test(<sources> LINK_LIBRARIES <library> [<library> [...]]
+ [TEST_NAME <name>]
+ [NAME_PREFIX <prefix>]
+ [GUI])
+
+This is a single-test form of ecm_add_tests that allows multiple source files
+to be used for a single test. If using multiple source files, TEST_NAME must
+be given; this will be used for both the target and test names (and, as with
+ecm_add_tests(), the NAME_PREFIX argument will be prepended to the test name).
+
+
+Since pre-1.0.0.
+#]=======================================================================]
+
include(CMakeParseArguments)
include(ECMMarkAsTest)
include(ECMMarkNonGuiExecutable)