cmake: format docstrings

This commit is contained in:
raiden00pl 2023-07-27 08:50:57 +02:00 committed by Xiang Xiao
parent 8e85e52708
commit 5c9c518f7f
5 changed files with 49 additions and 31 deletions

View File

@ -43,7 +43,7 @@ define_property(
#
# Parameters:
# NAME : unique name of application
# PRIORITY : priority
# PRIORITY : priority
# STACKSIZE : stack size
# COMPILE_FLAGS : compile flags
# INCLUDE_DIRECTORIES : include directories

View File

@ -180,7 +180,6 @@ endfunction()
#
function(nuttx_library_import library_name library_path)
add_library(${library_name} STATIC IMPORTED GLOBAL)
set_target_properties(${library_name}
PROPERTIES IMPORTED_LOCATION
${library_path})
set_target_properties(${library_name} PROPERTIES IMPORTED_LOCATION
${library_path})
endfunction()

View File

@ -18,14 +18,19 @@
#
# ##############################################################################
# nuttx_add_romfs Generates a ROMFS image in a C array, which is built to an
# OBJECT library.
# ~~~
# nuttx_add_romfs
#
# Parameters: - NAME: determines the romfs label and name of target
# (romfs_${NAME}) - HEADER: option to indicate that a .h file is to be generated
# instead of a .c - PREFIX: optional prefix to add to image name (as
# romfs_${PREFIX}.img) - NONCONST: option to indicate the array should be
# non-const - DEPENDS: list of targets that should be depended on
# Description:
# Generates a ROMFS image in a C array, which is built to an OBJECT library.
#
# Parameters:
# NAME : determines the romfs label and name of target (romfs_${NAME})
# HEADER : option to indicate that a .h file is to be generated instead of a .c
# PREFIX : optional prefix to add to image name (as romfs_${PREFIX}.img)
# NONCONST: option to indicate the array should be non-const
# DEPENDS : list of targets that should be depended on
# ~~~
function(nuttx_add_romfs)
nuttx_parse_function_args(

View File

@ -18,13 +18,19 @@
#
# ##############################################################################
# nuttx_add_symtab Generates a symbol table of undefined symbols from a set of
# binaries
# ~~~
# nuttx_add_symtab
#
# Parameters: - NAME: name of symtab (output will be symtab_${NAME}.c) -
# BINARIES: list of binary target names to process (dependencies will be added
# to these targets) - PREFIX: optional prefix to add to symtab variable name -
# EXCLUDE: optional list of symbols to exclude (ie: assume they are defined)
# Description:
# Generates a symbol table of undefined symbols from a set of binaries
#
# Parameters:
# NAME : name of symtab (output will be symtab_${NAME}.c)
# BINARIES: list of binary target names to process (dependencies will be added
# to these targets)
# PREFIX : optional prefix to add to symtab variable name
# EXCLUDE : optional list of symbols to exclude (ie: assume they are defined)
# ~~~
function(nuttx_add_symtab)
nuttx_parse_function_args(

View File

@ -29,32 +29,40 @@
include(CMakeParseArguments)
# =============================================================================
#
# ~~~
# nuttx_parse_function_args
#
# This function simplifies usage of the cmake_parse_arguments module. It is
# intended to be called by other functions.
#
# Usage: nuttx_parse_function_args( FUNC <name> [ OPTIONS <list> ] [ ONE_VALUE
# <list> ] [ MULTI_VALUE <list> ] REQUIRED <list> ARGN <ARGN>)
# Usage:
# nuttx_parse_function_args( FUNC <name> [ OPTIONS <list> ]
# [ ONE_VALUE <list> ] [ MULTI_VALUE <list> ] REQUIRED <list> ARGN <ARGN>)
#
# Input: FUNC : the name of the calling function OPTIONS : boolean flags
# ONE_VALUE : single value variables MULTI_VALUE : multi value variables
# REQUIRED : required arguments ARGN : the function input arguments,
# typically ${ARGN}
# Input:
# FUNC : the name of the calling function
# OPTIONS : boolean flags
# ONE_VALUE : single value variables
# MULTI_VALUE : multi value variables
# REQUIRED : required arguments
# ARGN : the function input arguments, typically ${ARGN}
#
# Output: The function arguments corresponding to the following are set:
# ${OPTIONS}, ${ONE_VALUE}, ${MULTI_VALUE}
# Output:
# The function arguments corresponding to the following are set:
# ${OPTIONS}, ${ONE_VALUE}, ${MULTI_VALUE}
#
# Example: function test() nuttx_parse_function_args( FUNC TEST ONE_VALUE NAME
# MULTI_VALUE LIST REQUIRED NAME LIST ARGN ${ARGN}) message(STATUS "name:
# ${NAME}") message(STATUS "list: ${LIST}") endfunction()
# Example:
# function test()
# nuttx_parse_function_args(FUNC TEST ONE_VALUE NAME MULTI_VALUE
# LIST REQUIRED NAME LIST ARGN ${ARGN})
# message(STATUS "name: ${NAME}")
# message(STATUS "list: ${LIST}")
# endfunction()
#
# test(NAME "hello" LIST a b c)
#
# OUTPUT: name: hello list: a b c
#
# ~~~
function(nuttx_parse_function_args)
cmake_parse_arguments(IN "" "FUNC"