Skip to content
Gerardo Hernandez edited this page May 16, 2020 · 3 revisions
Analyses C / C++ files to generate a precompiled header. The precompiled header will consist of the standard headers that are included in the provided files (or any header included by the files recursively).
  --input arg                     Files/directory to parse in search of standard/thirdparty includes. In case of directories only .c .cc .cpp .cxx files will be parsed (and the headers included in those)If a directory is specified, all the files of that directory will be parsed. More than one file can be specified if separated by semicolons(this option could be specified multiple times)
  -I [ --include ] arg            specify an additional include directory
  -I [ --includetree ] arg        same as --include, but the subfolders of the specified folder are searched as well (non-recursively, i.e. only the first level of subfolders)
  --excludeheader arg             specify a header file that will not be included in the precompiled header, nor it will be processed. This option is case insensitive.
  --excludedir arg                Specify directories which files will not be added to the precompiled header.
  --excluderegexp arg             An ECMAScript regexp defining the files which filename will be not processed. E.g.  moc_.* will allow to exclude Qt moc files, even if they are referenced by a .vcxproj or appear in a folder that was supposed to be processed
  --includeheader arg             specify a user header that will be included in the precompiled header, even if it was in a user include path. Written without brackets or quotes. E.g. stdio.h
  -S [ --sysinclude ] arg         specify an additional system or thirdparty include directory
  -S [ --sysincludetree ] arg     same as --sysinclude, but the subfolders of the specified folder are searched as well (non-recursively, i.e. only the first level of subfolders). Useful with some frameworks like Qt
  -n [ --nesting ] arg (=0)       specify maximal include nesting depth (normally should be 0)
  -D [ --def ] arg                macros to be defined. Separated by semicolon E.g. --def _M_X64;_WIN32;WIN32
  --vcxproj arg                   The Visual Studio project file the precompiled header will be generated for. Used to get input file paths, macros, include directories and precompiled header location. Note that most of the Visual Studio build macros are not supported. Example of unsupported build macro: $(VSInstallDir). This option is incompatible with --sln
  --sln arg                       Generates precompiled headers for all the projects specified in the solution. Note that most of the Visual Studio build macros are not supported. Example of unsupported build macro: $(VSInstallDir). This option is incompatible with --vcxproj
  --configuration arg             When --vcxproj is defined, the configuration to read macro definitions from. e.g. Debug|x64
  --pragma                        If specified, #pragma once will be added to the output, instead of the include guards
  -o [ --output ] arg (=stdafx.h) output file. This option will be ignored if the project file specified via --vcxproj or --sln already specify a precompiled header file
  --singlecore                    Do not use multiple threads to process the input (applies only if the --sln option was specified)
  --verbose                       Verbose output
  -h [ --help ]                   Produces this help
Clone this wiki locally