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
|
2016-11-17 22:26:45 +08:00
|
|
|
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
|
2015-02-19 00:14:32 +08:00
|
|
|
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
|
2016-11-17 22:26:45 +08:00
|
|
|
to the header list file directory. Use -prefix to specify a different
|
2013-09-20 22:40:52 +08:00
|
|
|
directory.
|
|
|
|
|
|
|
|
``<front-end-options>`` is a place-holder for regular Clang
|
|
|
|
front-end arguments, which must follow the <include-files-list>.
|
2015-05-07 02:43:01 +08:00
|
|
|
Note that by default, modularize assumes .h files
|
|
|
|
contain C++ source, so if you are using a different language,
|
|
|
|
you might need to use a ``-x`` option to tell Clang that the
|
|
|
|
header contains another language, i.e.: ``-x c``
|
2013-09-20 22:40:52 +08:00
|
|
|
|
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
|
|
|
|
2015-06-04 09:12:56 +08:00
|
|
|
.. option:: -prefix=<header-path>
|
2013-09-20 22:40:52 +08:00
|
|
|
|
|
|
|
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
|
2016-11-17 22:26:45 +08:00
|
|
|
directory. Use ``-prefix`` to specify a different directory.
|
2013-10-16 21:44:21 +08:00
|
|
|
|
|
|
|
.. option:: -module-map-path=<module-map-path>
|
|
|
|
|
2016-11-17 22:26:45 +08:00
|
|
|
Generate a module map and output it to the given file. See the description
|
2013-10-16 21:44:21 +08:00
|
|
|
in :ref:`module-map-generation`.
|
2016-12-14 00:38:45 +08:00
|
|
|
|
2015-07-10 08:37:25 +08:00
|
|
|
.. option:: -problem-files-list=<problem-files-list-file-name>
|
|
|
|
|
2016-11-17 22:26:45 +08:00
|
|
|
For use only with module map assistant. Input list of files that
|
|
|
|
have problems with respect to modules. These will still be
|
2015-07-10 08:37:25 +08:00
|
|
|
included in the generated module map, but will be marked as
|
|
|
|
"excluded" headers.
|
2013-10-16 21:44:21 +08:00
|
|
|
|
|
|
|
.. option:: -root-module=<root-name>
|
|
|
|
|
|
|
|
Put modules generated by the -module-map-path option in an enclosing
|
2016-11-17 22:26:45 +08:00
|
|
|
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.
|
2015-07-10 08:37:25 +08:00
|
|
|
|
|
|
|
.. option:: -display-file-lists
|
|
|
|
|
|
|
|
Display lists of good files (no compile errors), problem files,
|
|
|
|
and a combined list with problem files preceded by a '#'.
|
|
|
|
This can be used to quickly determine which files have problems.
|
|
|
|
The latter combined list might be useful in starting to modularize
|
2016-11-17 22:26:45 +08:00
|
|
|
a set of headers. You can start with a full list of headers,
|
2015-07-10 08:37:25 +08:00
|
|
|
use -display-file-lists option, and then use the combined list as
|
|
|
|
your intermediate list, uncommenting-out headers as you fix them.
|