2013-09-24 01:57:00 +08:00
|
|
|
================
|
2013-10-16 21:44:21 +08:00
|
|
|
Modularize Usage
|
2013-09-24 01:57:00 +08:00
|
|
|
================
|
2013-09-20 22:40:52 +08:00
|
|
|
|
2015-02-19 00:14:32 +08:00
|
|
|
``modularize [<modularize-options>] [<module-map>|<include-files-list>]*
|
2015-02-13 00:22:09 +08:00
|
|
|
[<front-end-options>...]``
|
2013-09-20 22:40:52 +08:00
|
|
|
|
|
|
|
``<modularize-options>`` is a place-holder for options
|
|
|
|
specific to modularize, which are described below in
|
|
|
|
`Modularize Command Line Options`.
|
|
|
|
|
2015-02-19 00:14:32 +08:00
|
|
|
``<module-map>`` specifies the path of a file name for an
|
|
|
|
existing module map. The module map must be well-formed in
|
|
|
|
terms of syntax. Modularize will extract the header file names
|
|
|
|
from the map. Only normal headers are checked, assuming headers
|
|
|
|
marked "private", "textual", or "exclude" are not to be checked
|
|
|
|
as a top-level include, assuming they either are included by
|
|
|
|
other headers which are checked, or they are not suitable for
|
|
|
|
modules.
|
|
|
|
|
2013-09-20 22:40:52 +08:00
|
|
|
``<include-files-list>`` specifies the path of a file name for a
|
|
|
|
file containing the newline-separated list of headers to check
|
|
|
|
with respect to each other. Lines beginning with '#' and empty
|
|
|
|
lines are ignored. Header file names followed by a colon and
|
|
|
|
other space-separated file names will include those extra files
|
|
|
|
as dependencies. The file names can be relative or full paths,
|
2013-09-24 01:57:00 +08:00
|
|
|
but must be on the same line. For example::
|
2013-09-20 22:40:52 +08:00
|
|
|
|
2013-09-24 01:57:00 +08:00
|
|
|
header1.h
|
|
|
|
header2.h
|
|
|
|
header3.h: header1.h header2.h
|
2013-09-20 22:40:52 +08:00
|
|
|
|
2013-10-16 21:44:21 +08:00
|
|
|
Note that unless a ``-prefix (header path)`` option is specified,
|
2013-09-20 22:40:52 +08:00
|
|
|
non-absolute file paths in the header list file will be relative
|
|
|
|
to the header list file directory. Use -prefix to specify a different
|
|
|
|
directory.
|
|
|
|
|
|
|
|
``<front-end-options>`` is a place-holder for regular Clang
|
|
|
|
front-end arguments, which must follow the <include-files-list>.
|
|
|
|
Note that by default, the underlying Clang front end assumes .h files
|
|
|
|
contain C source, so you might need to specify the ``-x c++`` Clang option
|
|
|
|
to tell Clang that the header contains C++ definitions.
|
|
|
|
|
2015-02-20 00:47:27 +08:00
|
|
|
Note also that because modularize does not use the clang driver,
|
|
|
|
you will likely need to pass in additional compiler front-end
|
|
|
|
arguments to match those passed in by default by the driver.
|
|
|
|
|
2013-09-20 22:40:52 +08:00
|
|
|
Modularize Command Line Options
|
2013-09-24 01:57:00 +08:00
|
|
|
===============================
|
2013-09-20 22:40:52 +08:00
|
|
|
|
|
|
|
.. option:: -prefix <header-path>
|
|
|
|
|
|
|
|
Prepend the given path to non-absolute file paths in the header list file.
|
|
|
|
By default, headers are assumed to be relative to the header list file
|
2013-10-16 21:44:21 +08:00
|
|
|
directory. Use ``-prefix`` to specify a different directory.
|
|
|
|
|
|
|
|
.. option:: -module-map-path=<module-map-path>
|
|
|
|
|
|
|
|
Generate a module map and output it to the given file. See the description
|
|
|
|
in :ref:`module-map-generation`.
|
|
|
|
|
|
|
|
.. option:: -root-module=<root-name>
|
|
|
|
|
|
|
|
Put modules generated by the -module-map-path option in an enclosing
|
|
|
|
module with the given name. See the description in :ref:`module-map-generation`.
|
2015-02-12 00:58:36 +08:00
|
|
|
|
|
|
|
.. option:: -block-check-header-list-only
|
|
|
|
|
|
|
|
Limit the #include-inside-extern-or-namespace-block
|
|
|
|
check to only those headers explicitly listed in the header list.
|
|
|
|
This is a work-around for avoiding error messages for private includes that
|
|
|
|
purposefully get included inside blocks.
|
2015-02-20 00:47:27 +08:00
|
|
|
|
|
|
|
.. option:: -no-coverage-check
|
|
|
|
|
|
|
|
Don't do the coverage check for a module map.
|
|
|
|
|
|
|
|
.. option:: -coverage-check-only
|
|
|
|
|
|
|
|
Only do the coverage check for a module map.
|