From 20f4ef1f1bceb359a1fd04afe86a2d9a997a08eb Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 19 May 2025 00:22:32 +0200 Subject: [PATCH] CheckPrototypeDefinition: Add intro code block - Added intro code block showing how to include this module. - Used word "command" instead of "function". - Added a rubric title for variables that affect the check. - Synced module docs. --- Modules/CheckPrototypeDefinition.cmake | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Modules/CheckPrototypeDefinition.cmake b/Modules/CheckPrototypeDefinition.cmake index 21585d54fa..b1acaab502 100644 --- a/Modules/CheckPrototypeDefinition.cmake +++ b/Modules/CheckPrototypeDefinition.cmake @@ -5,10 +5,24 @@ CheckPrototypeDefinition ------------------------ -Check if a ``C`` function has the expected prototype. +This module provides a command to check if a C function has the expected +prototype. + +Load this module in a CMake project with: + +.. code-block:: cmake + + include(CheckPrototypeDefinition) + +Commands +^^^^^^^^ + +This module provides the following command: .. command:: check_prototype_definition + Checks if a C function has the expected prototype: + .. code-block:: cmake check_prototype_definition( ) @@ -41,8 +55,10 @@ Check if a ``C`` function has the expected prototype. { return ; } int main(...) { ...()... } -The following variables may be set before calling this function to modify -the way the check is run: + .. rubric:: Variables Affecting the Check + + The following variables may be set before calling this command to modify + the way the check is run: .. include:: /module/include/CMAKE_REQUIRED_FLAGS.rst