From 5512e03562694ebfe571a3b6068a7d35d9ddfd7a Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Sat, 17 Apr 2021 11:02:00 +0200 Subject: 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 --- modules/ECMPackageConfigHelpers.cmake | 104 +++++++++++++++++----------------- 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'modules/ECMPackageConfigHelpers.cmake') diff --git a/modules/ECMPackageConfigHelpers.cmake b/modules/ECMPackageConfigHelpers.cmake index 8d48772b..6bff6927 100644 --- a/modules/ECMPackageConfigHelpers.cmake +++ b/modules/ECMPackageConfigHelpers.cmake @@ -1,60 +1,60 @@ -#.rst: -# ECMPackageConfigHelpers -# ----------------------- -# -# Helper macros for generating CMake package config files. -# -# ``write_basic_package_version_file()`` is the same as the one provided by the -# `CMakePackageConfigHelpers -# `_ -# module in CMake; see that module's documentation for -# more information. -# -# :: -# -# ecm_configure_package_config_file( -# INSTALL_DESTINATION -# [PATH_VARS [ [...]] -# [NO_SET_AND_CHECK_MACRO] -# [NO_CHECK_REQUIRED_COMPONENTS_MACRO]) -# -# -# This behaves in the same way as configure_package_config_file() from CMake -# 2.8.12, except that it adds an extra helper macro: find_dependency(). It is -# highly recommended that you read the `documentation for -# CMakePackageConfigHelpers -# `_ -# for more information, particularly with regard to the PATH_VARS argument. -# -# Note that there is no argument that will disable the find_dependency() macro; -# if you do not require this macro, you should use -# ``configure_package_config_file`` from the CMakePackageConfigHelpers module. -# -# CMake 3.0 includes a CMakeFindDependencyMacro module that provides the -# find_dependency() macro (which you can ``include()`` in your package config -# file), so this file is only useful for projects wishing to provide config -# files that will work with CMake 2.8.12. -# -# Additional Config File Macros -# ============================= -# -# :: -# -# find_dependency( [ [EXACT]]) -# -# find_dependency() should be used instead of find_package() to find package -# dependencies. It forwards the correct parameters for EXACT, QUIET and -# REQUIRED which were passed to the original find_package() call. It also sets -# an informative diagnostic message if the dependency could not be found. -# -# Since pre-1.0.0. - -#============================================================================= # SPDX-FileCopyrightText: 2014 Alex Merry # SPDX-FileCopyrightText: 2013 Stephen Kelly # # SPDX-License-Identifier: BSD-3-Clause +#[=======================================================================[.rst: +ECMPackageConfigHelpers +----------------------- + +Helper macros for generating CMake package config files. + +``write_basic_package_version_file()`` is the same as the one provided by the +`CMakePackageConfigHelpers +`_ +module in CMake; see that module's documentation for +more information. + +:: + + ecm_configure_package_config_file( + INSTALL_DESTINATION + [PATH_VARS [ [...]] + [NO_SET_AND_CHECK_MACRO] + [NO_CHECK_REQUIRED_COMPONENTS_MACRO]) + + +This behaves in the same way as configure_package_config_file() from CMake +2.8.12, except that it adds an extra helper macro: find_dependency(). It is +highly recommended that you read the `documentation for +CMakePackageConfigHelpers +`_ +for more information, particularly with regard to the PATH_VARS argument. + +Note that there is no argument that will disable the find_dependency() macro; +if you do not require this macro, you should use +``configure_package_config_file`` from the CMakePackageConfigHelpers module. + +CMake 3.0 includes a CMakeFindDependencyMacro module that provides the +find_dependency() macro (which you can ``include()`` in your package config +file), so this file is only useful for projects wishing to provide config +files that will work with CMake 2.8.12. + +Additional Config File Macros +============================= + +:: + + find_dependency( [ [EXACT]]) + +find_dependency() should be used instead of find_package() to find package +dependencies. It forwards the correct parameters for EXACT, QUIET and +REQUIRED which were passed to the original find_package() call. It also sets +an informative diagnostic message if the dependency could not be found. + +Since pre-1.0.0. +#]=======================================================================] + include(${CMAKE_ROOT}/Modules/CMakePackageConfigHelpers.cmake) set(_ecm_package_config_helpers_included TRUE) -- cgit v1.2.1