XXX
Builds a Microsoft Visual C++ precompiled header.
Calling this builder method
returns a list of two targets: the PCH as the first element, and the object
file as the second element. Normally the object file is ignored.
This builder method is only
provided when Microsoft Visual C++ is being used as the compiler.
The PCH builder method is generally used in
conjuction with the PCH construction variable to force object files to use
the precompiled header:
env['PCH'] = env.PCH('StdAfx.cpp')[0]
Builds a Microsoft Visual C++ resource file.
This builder method is only provided
when Microsoft Visual C++ or MinGW is being used as the compiler. The
.res
(or
.o
for MinGW) suffix is added to the target name if no other suffix is given.
The source
file is scanned for implicit dependencies as though it were a C file.
Example:
env.RES('resource.rc')
Options added to the compiler command line
to support building with precompiled headers.
The default value expands expands to the appropriate
Microsoft Visual C++ command-line options
when the &cv-PCH; construction variable is set.
Options added to the compiler command line
to support storing debugging information in a
Microsoft Visual C++ PDB file.
The default value expands expands to appropriate
Microsoft Visual C++ command-line options
when the &cv-PDB; construction variable is set.
The Visual C++ compiler option that SCons uses by default
to generate PDB information is .
This works correctly with parallel () builds
because it embeds the debug information in the intermediate object files,
as opposed to sharing a single PDB file between multiple object files.
This is also the only way to get debug information
embedded into a static library.
Using the instead may yield improved
link-time performance,
although parallel builds will no longer work.
You can generate PDB files with the
switch by overriding the default &cv-CCPDBFLAGS; variable as follows:
import SCons.Util
env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Zi /Fd%s" % File(PDB)) or ""}'])
An alternative would be to use the
to put the debugging information in a separate .pdb
file for each object file by overriding
the &cv-CCPDBFLAGS; variable as follows:
env['CCPDBFLAGS'] = '/Zi /Fd${TARGET}.pdb'
The Microsoft Visual C++ precompiled header that will be used when compiling
object files. This variable is ignored by tools other than Microsoft Visual C++.
When this variable is
defined SCons will add options to the compiler command line to
cause it to use the precompiled header, and will also set up the
dependencies for the PCH file.
Example:
env['PCH'] = 'StdAfx.pch'
The command line used by the
&b-PCH;
builder to generated a precompiled header.
The string displayed when generating a precompiled header.
If this is not set, then &cv-PCHCOM; (the command line) is displayed.
This variable specifies how much of a source file is precompiled. This
variable is ignored by tools other than Microsoft Visual C++, or when
the PCH variable is not being used. When this variable is define it
must be a string that is the name of the header that
is included at the end of the precompiled portion of the source files, or
the empty string if the "#pragma hrdstop" construct is being used:
env['PCHSTOP'] = 'StdAfx.h'
The resource compiler used to build
a Microsoft Visual C++ resource file.
The command line used to build
a Microsoft Visual C++ resource file.
The string displayed when invoking the resource compiler
to build a Microsoft Visual C++ resource file.
If this is not set, then &cv-RCCOM; (the command line) is displayed.
The flags passed to the resource compiler by the RES builder.