From c20d22c951e61a06701f6c2201add7c11915e7c5 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Thu, 10 Apr 2014 21:38:09 +0100 Subject: Add documentation generation using Sphinx This is deliberately modelled very closely on CMake's documentation system. It's a hefty patch, because it involved changing all the documentation to be in reStructuredText format. I also cleaned up the copyright/license statements at the same time. Note that the find modules contain the full license, due to the fact that ecm_use_find_module() copies them out of the ECM distribution. --- modules/ECMAddTests.cmake | 60 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 19 deletions(-) (limited to 'modules/ECMAddTests.cmake') diff --git a/modules/ECMAddTests.cmake b/modules/ECMAddTests.cmake index 67026eca..9052d886 100644 --- a/modules/ECMAddTests.cmake +++ b/modules/ECMAddTests.cmake @@ -1,28 +1,50 @@ -include(ECMMarkAsTest) -include(ECMMarkNonGuiExecutable) -# This file provides the functions ecm_add_test() and ecm_add_tests(). +#.rst: +# ECMAddTests +# ----------- +# +# Add test executables. +# +# :: +# +# ecm_add_test( LINK_LIBRARIES [ [...]] +# [TEST_NAME ] +# [NAME_PREFIX ] +# [GUI]) # -# ecm_add_test( TEST_NAME NAME_PREFIX LINK_LIBRARIES [GUI]) +# Add a new unit test using the passed source files. The parameter TEST_NAME is +# used to set the name of the resulting test. It may be omitted if there is +# exactly one source file. In that case the name of the source file (without the +# file extension) will be used as the test name. If the flag GUI is passed the +# test binary will be a GUI executable, otherwise the resulting binary will be a +# console application. The test will be linked against the libraries and/or +# targets passed to LINK_LIBRARIES. # -# Add a new unit test using the passed source files. The parameter TEST_NAME is used to set the name -# of the resulting test. It may be omitted if there is exactly one source file. In that case the name of -# the source file (without the file extension) will be used as the test name. -# If the flag GUI is passed the test binary will be a GUI executable, otherwise the resulting -# binary will be a console application. # -# ecm_add_tests( NAME_PREFIX LINK_LIBRARIES [GUI]) +# :: # -# Add a new unit test for every source file passed. The name of the tests will be the name of the -# corresponding source file minus the file extension. If NAME_PREFIX is set, that string will be -# prepended to each of the unit test names. Each of the unit tests will be linked against the -# libraries and/or targets passed in the LINK_LIBRARIES parameter. -# If the flag GUI is passed the test binary will be a GUI executable, otherwise the resulting -# binary will be a console application. +# ecm_add_tests( LINK_LIBRARIES [ [...]] +# [NAME_PREFIX ] +# [GUI]) # -# Copyright (c) 2013, Alexander Richardson, +# This is a convenient version of ecm_add_test() for when you have many tests +# that consist of a single source file each. It behaves like calling +# ecm_add_test() once for each source file, with the same named arguments. + +#============================================================================= +# Copyright 2013 Alexander Richardson +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file COPYING-CMAKE-SCRIPTS for details. # -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of extra-cmake-modules, substitute the full +# License text for the above reference.) + +include(ECMMarkAsTest) +include(ECMMarkNonGuiExecutable) function(ecm_add_test) set(options GUI) -- cgit v1.2.1