summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-09 14:21:07 (GMT)
committerBrad King <brad.king@kitware.com>2015-06-09 14:21:42 (GMT)
commit801b799f9d5f1d904c4605d19b798ed489be925d (patch)
treee1d446a3e80ebd7f0a6dabdc4bdd5dcc6104990c /Modules
parent223e2ec28dab4360f573932dfc0991744ddc0918 (diff)
downloadCMake-801b799f9d5f1d904c4605d19b798ed489be925d.zip
CMake-801b799f9d5f1d904c4605d19b798ed489be925d.tar.gz
CMake-801b799f9d5f1d904c4605d19b798ed489be925d.tar.bz2
FindBISON: Improve documentation formatting
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindBISON.cmake76
1 files changed, 43 insertions, 33 deletions
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake
index ec3ee78..4002cc6 100644
--- a/Modules/FindBISON.cmake
+++ b/Modules/FindBISON.cmake
@@ -2,60 +2,70 @@
# FindBISON
# ---------
#
-# Find bison executable and provides macros to generate custom build rules
+# Find ``bison`` executable and provide a macro to generate custom build rules.
#
# The module defines the following variables:
#
-# ::
+# ``BISON_EXECUTABLE``
+# path to the ``bison`` program
#
-# BISON_EXECUTABLE - path to the bison program
-# BISON_VERSION - version of bison
-# BISON_FOUND - true if the program was found
+# ``BISON_VERSION``
+# version of ``bison``
#
+# ``BISON_FOUND``
+# true if the program was found
#
+# The minimum required version of ``bison`` can be specified using the
+# standard CMake syntax, e.g. ``find_package(BISON 2.1.3)``.
#
-# The minimum required version of bison can be specified using the
-# standard CMake syntax, e.g. find_package(BISON 2.1.3)
+# If ``bison`` is found, the module defines the macro::
#
-# If bison is found, the module defines the macros:
+# BISON_TARGET(<Name> <YaccInput> <CodeOutput>
+# [COMPILE_FLAGS <flags>]
+# [VERBOSE <file>]
+# )
#
-# ::
+# which will create a custom rule to generate a parser. ``<YaccInput>`` is
+# the path to a yacc file. ``<CodeOutput>`` is the name of the source file
+# generated by bison. A header file is also be generated, and contains
+# the token list.
#
-# BISON_TARGET(<Name> <YaccInput> <CodeOutput> [VERBOSE <file>]
-# [COMPILE_FLAGS <string>])
+# The options are:
#
-# which will create a custom rule to generate a parser. <YaccInput> is
-# the path to a yacc file. <CodeOutput> is the name of the source file
-# generated by bison. A header file is also be generated, and contains
-# the token list. If COMPILE_FLAGS option is specified, the next
-# parameter is added in the bison command line. if VERBOSE option is
-# specified, <file> is created and contains verbose descriptions of the
-# grammar and parser. The macro defines a set of variables:
+# ``COMPILE_FLAGS <flags>``
+# Specify flags to be added to the ``bison`` command line.
+#
+# ``VERBOSE <file>``
+# Tell ``bison`` to write verbose descriptions of the grammar and
+# parser to the given ``<file>``.
#
-# ::
+# The macro defines the following variables:
#
-# BISON_${Name}_DEFINED - true is the macro ran successfully
-# BISON_${Name}_INPUT - The input source file, an alias for <YaccInput>
-# BISON_${Name}_OUTPUT_SOURCE - The source file generated by bison
-# BISON_${Name}_OUTPUT_HEADER - The header file generated by bison
-# BISON_${Name}_OUTPUTS - The sources files generated by bison
-# BISON_${Name}_COMPILE_FLAGS - Options used in the bison command line
+# ``BISON_<Name>_DEFINED``
+# true is the macro ran successfully
#
+# ``BISON_<Name>_INPUT``
+# The input source file, an alias for <YaccInput>
#
+# ``BISON_<Name>_OUTPUT_SOURCE``
+# The source file generated by bison
#
-# ::
+# ``BISON_<Name>_OUTPUT_HEADER``
+# The header file generated by bison
#
-# ====================================================================
-# Example:
+# ``BISON_<Name>_OUTPUTS``
+# The sources files generated by bison
#
+# ``BISON_<Name>_COMPILE_FLAGS``
+# Options used in the ``bison`` command line
#
+# Example usage:
#
-# ::
+# .. code-block:: cmake
#
-# find_package(BISON)
-# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
-# add_executable(Foo main.cpp ${BISON_MyParser_OUTPUTS})
-# ====================================================================
+# find_package(BISON)
+# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
+# add_executable(Foo main.cpp ${BISON_MyParser_OUTPUTS})
#=============================================================================
# Copyright 2009 Kitware, Inc.