4 This file is processed by the bin/SConsDoc.py module.
5 See its __doc__ string for a discussion of the format.
9 Sets construction variables for the Microsoft Visual C/C++ compiler.
33 <!--STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME-->
60 Builds a Microsoft Visual C++ precompiled header.
61 Calling this builder method
62 returns a list of two targets: the PCH as the first element, and the object
63 file as the second element. Normally the object file is ignored.
64 This builder method is only
65 provided when Microsoft Visual C++ is being used as the compiler.
66 The PCH builder method is generally used in
67 conjuction with the PCH construction variable to force object files to use
68 the precompiled header:
71 env['PCH'] = env.PCH('StdAfx.cpp')[0]
78 Builds a Microsoft Visual C++ resource file.
79 This builder method is only provided
80 when Microsoft Visual C++ or MinGW is being used as the compiler. The
81 <filename>.res</filename>
83 <filename>.o</filename>
84 for MinGW) suffix is added to the target name if no other suffix is given.
86 file is scanned for implicit dependencies as though it were a C file.
90 env.RES('resource.rc')
95 <cvar name="CCPCHFLAGS">
97 Options added to the compiler command line
98 to support building with precompiled headers.
99 The default value expands expands to the appropriate
100 Microsoft Visual C++ command-line options
101 when the &cv-link-PCH; construction variable is set.
105 <cvar name="CCPDBFLAGS">
107 Options added to the compiler command line
108 to support storing debugging information in a
109 Microsoft Visual C++ PDB file.
110 The default value expands expands to appropriate
111 Microsoft Visual C++ command-line options
112 when the &cv-link-PDB; construction variable is set.
114 The Visual C++ compiler option that SCons uses by default
115 to generate PDB information is <option>/Z7</option>.
116 This works correctly with parallel (<option>-j</option>) builds
117 because it embeds the debug information in the intermediate object files,
118 as opposed to sharing a single PDB file between multiple object files.
119 This is also the only way to get debug information
120 embedded into a static library.
121 Using the <option>/Zi</option> instead may yield improved
122 link-time performance,
123 although parallel builds will no longer work.
125 You can generate PDB files with the <option>/Zi</option>
126 switch by overriding the default &cv-link-CCPDBFLAGS; variable as follows:
129 env['CCPDBFLAGS'] = ['${(PDB and "/Zi /Fd%s" % File(PDB)) or ""}']
132 An alternative would be to use the <option>/Zi</option>
133 to put the debugging information in a separate <filename>.pdb</filename>
134 file for each object file by overriding
135 the &cv-link-CCPDBFLAGS; variable as follows:
138 env['CCPDBFLAGS'] = '/Zi /Fd${TARGET}.pdb'
145 The Microsoft Visual C++ precompiled header that will be used when compiling
146 object files. This variable is ignored by tools other than Microsoft Visual C++.
147 When this variable is
148 defined SCons will add options to the compiler command line to
149 cause it to use the precompiled header, and will also set up the
150 dependencies for the PCH file.
154 env['PCH'] = 'StdAfx.pch'
161 The command line used by the
163 builder to generated a precompiled header.
167 <cvar name="PCHCOMSTR">
169 The string displayed when generating a precompiled header.
170 If this is not set, then &cv-link-PCHCOM; (the command line) is displayed.
174 <cvar name="PCHPDBFLAGS">
176 A construction variable that, when expanded,
177 adds the <literal>/yD</literal> flag to the command line
178 only if the &cv-PDB; construction variable is set.
182 <cvar name="PCHSTOP">
184 This variable specifies how much of a source file is precompiled. This
185 variable is ignored by tools other than Microsoft Visual C++, or when
186 the PCH variable is not being used. When this variable is define it
187 must be a string that is the name of the header that
188 is included at the end of the precompiled portion of the source files, or
189 the empty string if the "#pragma hrdstop" construct is being used:
192 env['PCHSTOP'] = 'StdAfx.h'
199 The resource compiler used to build
200 a Microsoft Visual C++ resource file.
206 The command line used to build
207 a Microsoft Visual C++ resource file.
211 <cvar name="RCCOMSTR">
213 The string displayed when invoking the resource compiler
214 to build a Microsoft Visual C++ resource file.
215 If this is not set, then &cv-link-RCCOM; (the command line) is displayed.
219 <cvar name="RCFLAGS">
221 The flags passed to the resource compiler by the RES builder.
225 <cvar name="RCINCFLAGS">
227 An automatically-generated construction variable
228 containing the command-line options
229 for specifying directories to be searched
230 by the resource compiler.
231 The value of &cv-RCINCFLAGS; is created
232 by appending &cv-RCINCPREFIX; and &cv-RCINCSUFFIX;
233 to the beginning and end
234 of each directory in &cv-CPPPATH;.
238 <cvar name="RCINCPREFIX">
240 The prefix (flag) used to specify an include directory
241 on the resource compiler command line.
242 This will be appended to the beginning of each directory
243 in the &cv-CPPPATH; construction variable
244 when the &cv-RCINCFLAGS; variable is expanded.
248 <cvar name="RCINCSUFFIX">
250 The suffix used to specify an include directory
251 on the resource compiler command line.
252 This will be appended to the end of each directory
253 in the &cv-CPPPATH; construction variable
254 when the &cv-RCINCFLAGS; variable is expanded.