summaryrefslogtreecommitdiffstats
path: root/Modules/FindFLEX.cmake
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2018-10-22 14:31:08 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2018-10-22 15:09:34 (GMT)
commitdf4ed1e9ffcdb6b99ccff9e6f44808fdd2abda56 (patch)
tree4617dc2407a2e8e9c2bfdf77f09bdd396a9823e0 /Modules/FindFLEX.cmake
parent7115aa6c2249ec368fe0dfbd257a22eb0e04042d (diff)
downloadCMake-df4ed1e9ffcdb6b99ccff9e6f44808fdd2abda56.zip
CMake-df4ed1e9ffcdb6b99ccff9e6f44808fdd2abda56.tar.gz
CMake-df4ed1e9ffcdb6b99ccff9e6f44808fdd2abda56.tar.bz2
Help: Convert remaining modules to block-style comments
Diffstat (limited to 'Modules/FindFLEX.cmake')
-rw-r--r--Modules/FindFLEX.cmake189
1 files changed, 95 insertions, 94 deletions
diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake
index 3945b78..edebe75 100644
--- a/Modules/FindFLEX.cmake
+++ b/Modules/FindFLEX.cmake
@@ -1,100 +1,101 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
-#.rst:
-# FindFLEX
-# --------
-#
-# Find flex executable and provides a macro to generate custom build rules
-#
-#
-#
-# The module defines the following variables:
-#
-# ::
-#
-# FLEX_FOUND - true is flex executable is found
-# FLEX_EXECUTABLE - the path to the flex executable
-# FLEX_VERSION - the version of flex
-# FLEX_LIBRARIES - The flex libraries
-# FLEX_INCLUDE_DIRS - The path to the flex headers
-#
-#
-#
-# The minimum required version of flex can be specified using the
-# standard syntax, e.g. find_package(FLEX 2.5.13)
-#
-#
-#
-# If flex is found on the system, the module provides the macro:
-#
-# ::
-#
-# FLEX_TARGET(Name FlexInput FlexOutput
-# [COMPILE_FLAGS <string>]
-# [DEFINES_FILE <string>]
-# )
-#
-# which creates a custom command to generate the <FlexOutput> file from
-# the <FlexInput> file. If COMPILE_FLAGS option is specified, the next
-# parameter is added to the flex command line. If flex is configured to
-# output a header file, the DEFINES_FILE option may be used to specify its
-# name. Name is an alias used to get details of this custom command.
-# Indeed the macro defines the following variables:
-#
-# ::
-#
-# FLEX_${Name}_DEFINED - true is the macro ran successfully
-# FLEX_${Name}_OUTPUTS - the source file generated by the custom rule, an
-# alias for FlexOutput
-# FLEX_${Name}_INPUT - the flex source file, an alias for ${FlexInput}
-# FLEX_${Name}_OUTPUT_HEADER - the header flex output, if any.
-#
-#
-#
-# Flex scanners often use tokens defined by Bison: the code generated
-# by Flex depends of the header generated by Bison. This module also
-# defines a macro:
-#
-# ::
-#
-# ADD_FLEX_BISON_DEPENDENCY(FlexTarget BisonTarget)
-#
-# which adds the required dependency between a scanner and a parser
-# where <FlexTarget> and <BisonTarget> are the first parameters of
-# respectively FLEX_TARGET and BISON_TARGET macros.
-#
-# ::
-#
-# ====================================================================
-# Example:
-#
-#
-#
-# ::
-#
-# find_package(BISON)
-# find_package(FLEX)
-#
-#
-#
-# ::
-#
-# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
-# FLEX_TARGET(MyScanner lexer.l ${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp)
-# ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)
-#
-#
-#
-# ::
-#
-# include_directories(${CMAKE_CURRENT_BINARY_DIR})
-# add_executable(Foo
-# Foo.cc
-# ${BISON_MyParser_OUTPUTS}
-# ${FLEX_MyScanner_OUTPUTS}
-# )
-# ====================================================================
+#[=======================================================================[.rst:
+FindFLEX
+--------
+
+Find flex executable and provides a macro to generate custom build rules
+
+
+
+The module defines the following variables:
+
+::
+
+ FLEX_FOUND - true is flex executable is found
+ FLEX_EXECUTABLE - the path to the flex executable
+ FLEX_VERSION - the version of flex
+ FLEX_LIBRARIES - The flex libraries
+ FLEX_INCLUDE_DIRS - The path to the flex headers
+
+
+
+The minimum required version of flex can be specified using the
+standard syntax, e.g. find_package(FLEX 2.5.13)
+
+
+
+If flex is found on the system, the module provides the macro:
+
+::
+
+ FLEX_TARGET(Name FlexInput FlexOutput
+ [COMPILE_FLAGS <string>]
+ [DEFINES_FILE <string>]
+ )
+
+which creates a custom command to generate the <FlexOutput> file from
+the <FlexInput> file. If COMPILE_FLAGS option is specified, the next
+parameter is added to the flex command line. If flex is configured to
+output a header file, the DEFINES_FILE option may be used to specify its
+name. Name is an alias used to get details of this custom command.
+Indeed the macro defines the following variables:
+
+::
+
+ FLEX_${Name}_DEFINED - true is the macro ran successfully
+ FLEX_${Name}_OUTPUTS - the source file generated by the custom rule, an
+ alias for FlexOutput
+ FLEX_${Name}_INPUT - the flex source file, an alias for ${FlexInput}
+ FLEX_${Name}_OUTPUT_HEADER - the header flex output, if any.
+
+
+
+Flex scanners often use tokens defined by Bison: the code generated
+by Flex depends of the header generated by Bison. This module also
+defines a macro:
+
+::
+
+ ADD_FLEX_BISON_DEPENDENCY(FlexTarget BisonTarget)
+
+which adds the required dependency between a scanner and a parser
+where <FlexTarget> and <BisonTarget> are the first parameters of
+respectively FLEX_TARGET and BISON_TARGET macros.
+
+::
+
+ ====================================================================
+ Example:
+
+
+
+::
+
+ find_package(BISON)
+ find_package(FLEX)
+
+
+
+::
+
+ BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
+ FLEX_TARGET(MyScanner lexer.l ${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp)
+ ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)
+
+
+
+::
+
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ add_executable(Foo
+ Foo.cc
+ ${BISON_MyParser_OUTPUTS}
+ ${FLEX_MyScanner_OUTPUTS}
+ )
+ ====================================================================
+#]=======================================================================]
find_program(FLEX_EXECUTABLE NAMES flex win_flex DOC "path to the flex executable")
mark_as_advanced(FLEX_EXECUTABLE)