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 --- kde-modules/KDECompilerSettings.cmake | 76 +++++++++++++++++------------------ 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'kde-modules/KDECompilerSettings.cmake') diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake index fcd80f30..7fd905cf 100644 --- a/kde-modules/KDECompilerSettings.cmake +++ b/kde-modules/KDECompilerSettings.cmake @@ -1,41 +1,3 @@ -#.rst: -# KDECompilerSettings -# ------------------- -# -# Set useful compile and link flags for C++ (and C) code. -# -# Enables many more warnings than the default, and sets stricter modes -# for some compiler features. By default, exceptions are disabled; -# kde_target_enable_exceptions() can be used to re-enable them for a -# specific target. -# -# NB: it is recommended to include this module with the NO_POLICY_SCOPE -# flag, otherwise you may get spurious warnings with some versions of CMake. -# -# This module provides the following functions:: -# -# kde_source_files_enable_exceptions([file1 [file2 [...]]]) -# -# Enables exceptions for specific source files. This should not be -# used on source files in a language other than C++. -# -# :: -# -# kde_target_enable_exceptions(target ) -# -# Enables exceptions for a specific target. This should not be used -# on a target that has source files in a language other than C++. -# -# :: -# -# kde_enable_exceptions() -# -# Enables exceptions for C++ source files compiled for the -# CMakeLists.txt file in the current directory and all subdirectories. -# -# Since pre-1.0.0. - -#============================================================================= # SPDX-FileCopyrightText: 2014 Alex Merry # SPDX-FileCopyrightText: 2013 Stephen Kelly # SPDX-FileCopyrightText: 2012-2013 Raphael Kubo da Costa @@ -45,6 +7,44 @@ # # SPDX-License-Identifier: BSD-3-Clause +#[=======================================================================[.rst: +KDECompilerSettings +------------------- + +Set useful compile and link flags for C++ (and C) code. + +Enables many more warnings than the default, and sets stricter modes +for some compiler features. By default, exceptions are disabled; +kde_target_enable_exceptions() can be used to re-enable them for a +specific target. + +NB: it is recommended to include this module with the NO_POLICY_SCOPE +flag, otherwise you may get spurious warnings with some versions of CMake. + +This module provides the following functions:: + + kde_source_files_enable_exceptions([file1 [file2 [...]]]) + +Enables exceptions for specific source files. This should not be +used on source files in a language other than C++. + +:: + + kde_target_enable_exceptions(target ) + +Enables exceptions for a specific target. This should not be used +on a target that has source files in a language other than C++. + +:: + + kde_enable_exceptions() + +Enables exceptions for C++ source files compiled for the +CMakeLists.txt file in the current directory and all subdirectories. + +Since pre-1.0.0. +#]=======================================================================] + include("${ECM_MODULE_DIR}/ECMSourceVersionControl.cmake") ############################################################ -- cgit v1.2.1