diff options
author | William Deegan <bill@baddogconsulting.com> | 2022-07-25 03:49:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 03:49:17 (GMT) |
commit | 41b0831382603609dfd021cb4d5a0b2d9f06021d (patch) | |
tree | a11fe13c87cec4d3e0f1aa3d6aa4741739078340 /doc | |
parent | 2f10fe6c285646ee0d4eb021c4ee94aed4f319c7 (diff) | |
parent | 94133d4d3e63185f2649cc231ed182eba6df29d4 (diff) | |
download | SCons-41b0831382603609dfd021cb4d5a0b2d9f06021d.zip SCons-41b0831382603609dfd021cb4d5a0b2d9f06021d.tar.gz SCons-41b0831382603609dfd021cb4d5a0b2d9f06021d.tar.bz2 |
Merge pull request #4174 from jcbrill/jbrill-msvc-batchargs
MSVC enhancement to add all remaining msvc batch file command-line options as SCons variables
Diffstat (limited to 'doc')
-rw-r--r-- | doc/generated/functions.gen | 52 | ||||
-rw-r--r-- | doc/generated/tools.gen | 17 | ||||
-rw-r--r-- | doc/generated/variables.gen | 864 | ||||
-rw-r--r-- | doc/generated/variables.mod | 12 |
4 files changed, 857 insertions, 88 deletions
diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index a2d9acd..efc4c9e 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -1611,45 +1611,49 @@ See the manpage section "Construction Environments" for more details. </listitem> </varlistentry> <varlistentry id="f-Execute"> - <term><function>Execute</function>(<parameter>action, [strfunction, varlist]</parameter>)</term> - <term><replaceable>env</replaceable>.<methodname>Execute</methodname>(<parameter>action, [strfunction, varlist]</parameter>)</term> + <term><function>Execute</function>(<parameter>action, [actionargs ...]</parameter>)</term> + <term><replaceable>env</replaceable>.<methodname>Execute</methodname>(<parameter>action, [actionargs ...]</parameter>)</term> <listitem><para> -Executes an Action object. -The specified +Executes an Action. <parameter>action</parameter> may be an Action object -(see manpage section "Action Objects" -for an explanation of behavior), or it may be a command-line string, list of commands, or executable &Python; function, -each of which will be converted +each of which will first be converted into an Action object and then executed. Any additional arguments to &f-Execute; -(<parameter>strfunction</parameter>, <parameter>varlist</parameter>) are passed on to the &f-link-Action; factory function -which actually creates the Action object. -The exit value of the command -or return value of the &Python; function -will be returned. +which actually creates the Action object +(see the manpage section <link linkend="action_objects">Action Objects</link> +for a description). Example: +</para> + +<example_commands> +Execute(Copy('file.out', 'file.in')) +</example_commands> + +<para>&f-Execute; performs its action immediately, +as part of the SConscript-reading phase. +There are no sources or targets declared in an +&f-Execute; call, so any objects it manipulates +will not be tracked as part of the &SCons; dependency graph. +In the example above, neither +<filename>file.out</filename> nor +<filename>file.in</filename> will be tracked objects. </para> <para> -Note that +&f-Execute; returns the exit value of the command +or return value of the &Python; function. &scons; -will print an error message if the executed +prints an error message if the executed <parameter>action</parameter> -fails--that is, -exits with or returns a non-zero value. -&scons; -will +fails (exits with or returns a non-zero value), +however it does <emphasis>not</emphasis>, -however, -automatically terminate the build -if the specified -<parameter>action</parameter> -fails. +automatically terminate the build for such a failure. If you want the build to stop in response to a failed &f-Execute; call, @@ -1657,8 +1661,6 @@ you must explicitly check for a non-zero return value: </para> <example_commands> -Execute(Copy('file.out', 'file.in')) - if Execute("mkdir sub/dir/ectory"): # The mkdir failed, don't try to build. Exit(1) diff --git a/doc/generated/tools.gen b/doc/generated/tools.gen index ecc301a..35ded17 100644 --- a/doc/generated/tools.gen +++ b/doc/generated/tools.gen @@ -389,35 +389,35 @@ Sets construction variables for the dvips utility. <listitem><para> Set construction variables for generic POSIX Fortran 03 compilers. </para> -<para>Sets: &cv-link-F03;, &cv-link-F03COM;, &cv-link-F03FLAGS;, &cv-link-F03PPCOM;, &cv-link-SHF03;, &cv-link-SHF03COM;, &cv-link-SHF03FLAGS;, &cv-link-SHF03PPCOM;, &cv-link-_F03INCFLAGS;.</para><para>Uses: &cv-link-F03COMSTR;, &cv-link-F03PPCOMSTR;, &cv-link-SHF03COMSTR;, &cv-link-SHF03PPCOMSTR;.</para></listitem> +<para>Sets: &cv-link-F03;, &cv-link-F03COM;, &cv-link-F03FLAGS;, &cv-link-F03PPCOM;, &cv-link-SHF03;, &cv-link-SHF03COM;, &cv-link-SHF03FLAGS;, &cv-link-SHF03PPCOM;, &cv-link-_F03INCFLAGS;.</para><para>Uses: &cv-link-F03COMSTR;, &cv-link-F03PPCOMSTR;, &cv-link-FORTRANCOMMONFLAGS;, &cv-link-SHF03COMSTR;, &cv-link-SHF03PPCOMSTR;.</para></listitem> </varlistentry> <varlistentry id="t-f08"> <term>f08</term> <listitem><para> Set construction variables for generic POSIX Fortran 08 compilers. </para> -<para>Sets: &cv-link-F08;, &cv-link-F08COM;, &cv-link-F08FLAGS;, &cv-link-F08PPCOM;, &cv-link-SHF08;, &cv-link-SHF08COM;, &cv-link-SHF08FLAGS;, &cv-link-SHF08PPCOM;, &cv-link-_F08INCFLAGS;.</para><para>Uses: &cv-link-F08COMSTR;, &cv-link-F08PPCOMSTR;, &cv-link-SHF08COMSTR;, &cv-link-SHF08PPCOMSTR;.</para></listitem> +<para>Sets: &cv-link-F08;, &cv-link-F08COM;, &cv-link-F08FLAGS;, &cv-link-F08PPCOM;, &cv-link-SHF08;, &cv-link-SHF08COM;, &cv-link-SHF08FLAGS;, &cv-link-SHF08PPCOM;, &cv-link-_F08INCFLAGS;.</para><para>Uses: &cv-link-F08COMSTR;, &cv-link-F08PPCOMSTR;, &cv-link-FORTRANCOMMONFLAGS;, &cv-link-SHF08COMSTR;, &cv-link-SHF08PPCOMSTR;.</para></listitem> </varlistentry> <varlistentry id="t-f77"> <term>f77</term> <listitem><para> Set construction variables for generic POSIX Fortran 77 compilers. </para> -<para>Sets: &cv-link-F77;, &cv-link-F77COM;, &cv-link-F77FILESUFFIXES;, &cv-link-F77FLAGS;, &cv-link-F77PPCOM;, &cv-link-F77PPFILESUFFIXES;, &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANFLAGS;, &cv-link-SHF77;, &cv-link-SHF77COM;, &cv-link-SHF77FLAGS;, &cv-link-SHF77PPCOM;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANFLAGS;, &cv-link-SHFORTRANPPCOM;, &cv-link-_F77INCFLAGS;.</para><para>Uses: &cv-link-F77COMSTR;, &cv-link-F77PPCOMSTR;, &cv-link-FORTRANCOMSTR;, &cv-link-FORTRANPPCOMSTR;, &cv-link-SHF77COMSTR;, &cv-link-SHF77PPCOMSTR;, &cv-link-SHFORTRANCOMSTR;, &cv-link-SHFORTRANPPCOMSTR;.</para></listitem> +<para>Sets: &cv-link-F77;, &cv-link-F77COM;, &cv-link-F77FILESUFFIXES;, &cv-link-F77FLAGS;, &cv-link-F77PPCOM;, &cv-link-F77PPFILESUFFIXES;, &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANFLAGS;, &cv-link-SHF77;, &cv-link-SHF77COM;, &cv-link-SHF77FLAGS;, &cv-link-SHF77PPCOM;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANFLAGS;, &cv-link-SHFORTRANPPCOM;, &cv-link-_F77INCFLAGS;.</para><para>Uses: &cv-link-F77COMSTR;, &cv-link-F77PPCOMSTR;, &cv-link-FORTRANCOMMONFLAGS;, &cv-link-FORTRANCOMSTR;, &cv-link-FORTRANFLAGS;, &cv-link-FORTRANPPCOMSTR;, &cv-link-SHF77COMSTR;, &cv-link-SHF77PPCOMSTR;, &cv-link-SHFORTRANCOMSTR;, &cv-link-SHFORTRANFLAGS;, &cv-link-SHFORTRANPPCOMSTR;.</para></listitem> </varlistentry> <varlistentry id="t-f90"> <term>f90</term> <listitem><para> Set construction variables for generic POSIX Fortran 90 compilers. </para> -<para>Sets: &cv-link-F90;, &cv-link-F90COM;, &cv-link-F90FLAGS;, &cv-link-F90PPCOM;, &cv-link-SHF90;, &cv-link-SHF90COM;, &cv-link-SHF90FLAGS;, &cv-link-SHF90PPCOM;, &cv-link-_F90INCFLAGS;.</para><para>Uses: &cv-link-F90COMSTR;, &cv-link-F90PPCOMSTR;, &cv-link-SHF90COMSTR;, &cv-link-SHF90PPCOMSTR;.</para></listitem> +<para>Sets: &cv-link-F90;, &cv-link-F90COM;, &cv-link-F90FLAGS;, &cv-link-F90PPCOM;, &cv-link-SHF90;, &cv-link-SHF90COM;, &cv-link-SHF90FLAGS;, &cv-link-SHF90PPCOM;, &cv-link-_F90INCFLAGS;.</para><para>Uses: &cv-link-F90COMSTR;, &cv-link-F90PPCOMSTR;, &cv-link-FORTRANCOMMONFLAGS;, &cv-link-SHF90COMSTR;, &cv-link-SHF90PPCOMSTR;.</para></listitem> </varlistentry> <varlistentry id="t-f95"> <term>f95</term> <listitem><para> Set construction variables for generic POSIX Fortran 95 compilers. </para> -<para>Sets: &cv-link-F95;, &cv-link-F95COM;, &cv-link-F95FLAGS;, &cv-link-F95PPCOM;, &cv-link-SHF95;, &cv-link-SHF95COM;, &cv-link-SHF95FLAGS;, &cv-link-SHF95PPCOM;, &cv-link-_F95INCFLAGS;.</para><para>Uses: &cv-link-F95COMSTR;, &cv-link-F95PPCOMSTR;, &cv-link-SHF95COMSTR;, &cv-link-SHF95PPCOMSTR;.</para></listitem> +<para>Sets: &cv-link-F95;, &cv-link-F95COM;, &cv-link-F95FLAGS;, &cv-link-F95PPCOM;, &cv-link-SHF95;, &cv-link-SHF95COM;, &cv-link-SHF95FLAGS;, &cv-link-SHF95PPCOM;, &cv-link-_F95INCFLAGS;.</para><para>Uses: &cv-link-F95COMSTR;, &cv-link-F95PPCOMSTR;, &cv-link-FORTRANCOMMONFLAGS;, &cv-link-SHF95COMSTR;, &cv-link-SHF95PPCOMSTR;.</para></listitem> </varlistentry> <varlistentry id="t-fortran"> <term>fortran</term> @@ -437,10 +437,8 @@ Set construction variables for the &gXX; C++ compiler. <term>g77</term> <listitem><para> Set construction variables for the &g77; Fortran compiler. -Calls the &t-f77; Tool module -to set variables. </para> -</listitem> +<para>Sets: &cv-link-F77;, &cv-link-F77COM;, &cv-link-F77FILESUFFIXES;, &cv-link-F77PPCOM;, &cv-link-F77PPFILESUFFIXES;, &cv-link-FORTRAN;, &cv-link-FORTRANCOM;, &cv-link-FORTRANPPCOM;, &cv-link-SHF77;, &cv-link-SHF77COM;, &cv-link-SHF77FLAGS;, &cv-link-SHF77PPCOM;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANCOM;, &cv-link-SHFORTRANFLAGS;, &cv-link-SHFORTRANPPCOM;.</para><para>Uses: &cv-link-F77FLAGS;, &cv-link-FORTRANCOMMONFLAGS;, &cv-link-FORTRANFLAGS;.</para></listitem> </varlistentry> <varlistentry id="t-gas"> <term>gas</term> @@ -516,7 +514,8 @@ environment: <varlistentry id="t-gfortran"> <term>gfortran</term> <listitem><para> -Sets construction variables for the GNU F95/F2003 GNU compiler. +Sets construction variables for the GNU Fortran compiler. +Calls the &t-link-fortran; Tool module to set variables. </para> <para>Sets: &cv-link-F77;, &cv-link-F90;, &cv-link-F95;, &cv-link-FORTRAN;, &cv-link-SHF77;, &cv-link-SHF77FLAGS;, &cv-link-SHF90;, &cv-link-SHF90FLAGS;, &cv-link-SHF95;, &cv-link-SHF95FLAGS;, &cv-link-SHFORTRAN;, &cv-link-SHFORTRANFLAGS;.</para></listitem> </varlistentry> diff --git a/doc/generated/variables.gen b/doc/generated/variables.gen index 996e35a..533ea22 100644 --- a/doc/generated/variables.gen +++ b/doc/generated/variables.gen @@ -2682,6 +2682,17 @@ in the &cv-link-FORTRANFLAGS;, </para> </listitem> </varlistentry> + <varlistentry id="cv-FORTRANCOMMONFLAGS"> + <term> + <envar>FORTRANCOMMONFLAGS</envar> + </term> + <listitem><para> +General user-specified options that are passed to the Fortran compiler. +Similar to &cv-link-FORTRANFLAGS;, +but this variable is applied to all dialects. +</para> +</listitem> + </varlistentry> <varlistentry id="cv-FORTRANCOMSTR"> <term> <envar>FORTRANCOMSTR</envar> @@ -2709,7 +2720,8 @@ default, this is <literal>['.f', '.for', '.ftn']</literal> <envar>FORTRANFLAGS</envar> </term> <listitem><para> -General user-specified options that are passed to the Fortran compiler. +General user-specified options for the FORTRAN dialect +that are passed to the Fortran compiler. Note that this variable does <emphasis>not</emphasis> contain @@ -4686,16 +4698,16 @@ will be compiled separately. <envar>MSVC_NOTFOUND_POLICY</envar> </term> <listitem><para> -Specify the scons behavior when the Microsoft Visual C/C++ compiler is not detected. +Specify the &scons; behavior when the Microsoft Visual C/C++ compiler is not detected. </para> <para> - The <envar>MSVC_NOTFOUND_POLICY</envar> specifies the &scons; behavior when no msvc versions are detected or + The &cv-MSVC_NOTFOUND_POLICY; specifies the &scons; behavior when no msvc versions are detected or when the requested msvc version is not detected. </para> -<para> -The valid values for <envar>MSVC_NOTFOUND_POLICY</envar> and the corresponding &scons; behavior are: +<para> +The valid values for &cv-MSVC_NOTFOUND_POLICY; and the corresponding &scons; behavior are: </para> <variablelist> @@ -4736,7 +4748,7 @@ Note: in addition to the camel case values shown above, lower case and upper cas </para> <para> -The <envar>MSVC_NOTFOUND_POLICY</envar> is applied when any of the following conditions are satisfied: +The &cv-MSVC_NOTFOUND_POLICY; is applied when any of the following conditions are satisfied: <itemizedlist> <listitem><para> &cv-MSVC_VERSION; is specified, the default tools list is implicitly defined (i.e., the tools list is not specified), @@ -4753,7 +4765,7 @@ A non-default tools list is specified that contains one or more of the msvc tool </para> <para> -The <envar>MSVC_NOTFOUND_POLICY</envar> is ignored when any of the following conditions are satisfied: +The &cv-MSVC_NOTFOUND_POLICY; is ignored when any of the following conditions are satisfied: <itemizedlist> <listitem><para> &cv-MSVC_VERSION; is not specified and the default tools list is implicitly defined (i.e., the tools list is not specified). @@ -4768,10 +4780,659 @@ A non-default tool list is specified that does not contain any of the msvc tools </para> <para> -When <envar>MSVC_NOTFOUND_POLICY</envar> is not specified, the default &scons; behavior is to issue a warning and continue +Important usage details: +<itemizedlist> + +<listitem><para> +&cv-MSVC_NOTFOUND_POLICY; must be passed as an argument to the &f-link-Environment; +constructor when an msvc tool (e.g., &t-link-msvc;, &t-link-msvs;, etc.) is +loaded via the default tools list or via a tools list passed to the +&f-link-Environment; constructor. +Otherwise, &cv-MSVC_NOTFOUND_POLICY; must be set before the first msvc tool is +loaded into the environment. +</para></listitem> + +</itemizedlist> +</para> + +<para> +When &cv-MSVC_NOTFOUND_POLICY; is not specified, the default &scons; behavior is to issue a warning and continue subject to the conditions listed above. The default &scons; behavior may change in the future. </para> +</listitem> + </varlistentry> + <varlistentry id="cv-MSVC_SCRIPT_ARGS"> + <term> + <envar>MSVC_SCRIPT_ARGS</envar> + </term> + <listitem><para> +Pass user-defined arguments to the Visual C++ batch file determined via autodetection. +</para> + +<para> +&cv-MSVC_SCRIPT_ARGS; is available for msvc batch file arguments that do not have first-class support +via construction variables or when there is an issue with the appropriate construction variable validation. +When available, it is recommended to use the appropriate construction variables (e.g., &cv-link-MSVC_TOOLSET_VERSION;) +rather than &cv-MSVC_SCRIPT_ARGS; arguments. +</para> + +<para> +The valid values for &cv-MSVC_SCRIPT_ARGS; are: <literal>None</literal>, a string, +or a list of strings. +</para> + +<para> +The &cv-MSVC_SCRIPT_ARGS; value is converted to a scalar string (i.e., "flattened"). +The resulting scalar string, if not empty, is passed as an argument to the msvc batch file determined +via autodetection subject to the validation conditions listed below. +</para> + +<para> +&cv-MSVC_SCRIPT_ARGS; is ignored when the value is <literal>None</literal> and when the +result from argument conversion is an empty string. The validation conditions below do not apply. +</para> + +<para> +An exception is raised when any of the following conditions are satisfied: +<itemizedlist> + +<listitem><para> +&cv-MSVC_SCRIPT_ARGS; is specified for Visual Studio 2013 and earlier. +</para></listitem> + +<listitem><para> +Multiple SDK version arguments (e.g., <literal>'10.0.20348.0'</literal>) are specified +in &cv-MSVC_SCRIPT_ARGS;. +</para></listitem> + +<listitem><para> +&cv-link-MSVC_SDK_VERSION; is specified and an SDK version argument +(e.g., <literal>'10.0.20348.0'</literal>) is specified in &cv-MSVC_SCRIPT_ARGS;. +Multiple SDK version declarations via &cv-link-MSVC_SDK_VERSION; and &cv-MSVC_SCRIPT_ARGS; +are not allowed. +</para></listitem> + +<listitem><para> +Multiple toolset version arguments (e.g., <literal>'-vcvars_ver=14.29'</literal>) +are specified in &cv-MSVC_SCRIPT_ARGS;. +</para></listitem> + +<listitem><para> +&cv-link-MSVC_TOOLSET_VERSION; is specified and a toolset version argument +(e.g., <literal>'-vcvars_ver=14.29'</literal>) is specified in &cv-MSVC_SCRIPT_ARGS;. +Multiple toolset version declarations via &cv-link-MSVC_TOOLSET_VERSION; and +&cv-MSVC_SCRIPT_ARGS; are not allowed. +</para></listitem> + +<listitem><para> +Multiple spectre library arguments (e.g., <literal>'-vcvars_spectre_libs=spectre'</literal>) +are specified in &cv-MSVC_SCRIPT_ARGS;. +</para></listitem> + +<listitem><para> +&cv-link-MSVC_SPECTRE_LIBS; is enabled and a spectre library argument +(e.g., <literal>'-vcvars_spectre_libs=spectre'</literal>) is specified in +&cv-MSVC_SCRIPT_ARGS;. Multiple spectre library declarations via &cv-link-MSVC_SPECTRE_LIBS; +and &cv-MSVC_SCRIPT_ARGS; are not allowed. +</para></listitem> + +<listitem><para> +Multiple UWP arguments (e.g., <literal>uwp</literal> or <literal>store</literal>) are specified +in &cv-MSVC_SCRIPT_ARGS;. +</para></listitem> + +<listitem><para> +&cv-link-MSVC_UWP_APP; is enabled and a UWP argument (e.g., <literal>uwp</literal> or +<literal>store</literal>) is specified in &cv-MSVC_SCRIPT_ARGS;. Multiple UWP declarations +via &cv-link-MSVC_UWP_APP; and &cv-MSVC_SCRIPT_ARGS; are not allowed. +</para></listitem> + +</itemizedlist> +</para> + +<para> +Example 1 - A Visual Studio 2022 build with an SDK version and a toolset version +specified with a string argument: +<example_commands> +env = Environment(MSVC_VERSION='14.3', MSVC_SCRIPT_ARGS='10.0.20348.0 -vcvars_ver=14.29.30133') +</example_commands> +</para> + +<para> +Example 2 - A Visual Studio 2022 build with an SDK version and a toolset version +specified with a list argument: +<example_commands> +env = Environment(MSVC_VERSION='14.3', MSVC_SCRIPT_ARGS=['10.0.20348.0', '-vcvars_ver=14.29.30133']) +</example_commands> +</para> + +<para> +Important usage details: +<itemizedlist> + +<listitem><para> +&cv-MSVC_SCRIPT_ARGS; must be passed as an argument to the &f-link-Environment; +constructor when an msvc tool (e.g., &t-link-msvc;, &t-link-msvs;, etc.) is +loaded via the default tools list or via a tools list passed to the +&f-link-Environment; constructor. +Otherwise, &cv-MSVC_SCRIPT_ARGS; must be set before the first msvc tool is +loaded into the environment. +</para></listitem> + +<listitem><para> +Other than checking for multiple declarations as described above, &cv-MSVC_SCRIPT_ARGS; arguments +are not validated. +</para></listitem> + +<listitem><para> +<emphasis> +Erroneous, inconsistent, and/or version incompatible &cv-MSVC_SCRIPT_ARGS; arguments are likely +to result in build failures for reasons that are not readily apparent and may be difficult to diagnose. +</emphasis> +The burden is on the user to ensure that the arguments provided to the msvc batch file are valid, consistent +and compatible with the version of msvc selected. +</para></listitem> + +</itemizedlist> +</para> + +</listitem> + </varlistentry> + <varlistentry id="cv-MSVC_SCRIPTERROR_POLICY"> + <term> + <envar>MSVC_SCRIPTERROR_POLICY</envar> + </term> + <listitem><para> +Specify the &scons; behavior when Microsoft Visual C/C++ batch file errors are detected. +</para> + +<para> +The &cv-MSVC_SCRIPTERROR_POLICY; specifies the &scons; behavior when msvc batch file errors are +detected. +When &cv-MSVC_SCRIPTERROR_POLICY; is not specified, the default &scons; behavior is to suppress +msvc batch file error messages. +</para> +<para> +The root cause of msvc build failures may be difficult to diagnose. In these situations, setting +the &scons; behavior to issue a warning when msvc batch file errors are detected <emphasis>may</emphasis> +produce additional diagnostic information. +</para> + +<para> +The valid values for &cv-MSVC_SCRIPTERROR_POLICY; and the corresponding &scons; behavior are: +</para> + +<variablelist> + +<varlistentry> +<term><parameter>'Error' or 'Exception'</parameter></term> +<listitem> +<para> +Raise an exception when msvc batch file errors are detected. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><parameter>'Warning' or 'Warn'</parameter></term> +<listitem> +<para> +Issue a warning when msvc batch file errors are detected. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><parameter>'Ignore' or 'Suppress'</parameter></term> +<listitem> +<para> +Suppress msvc batch file error messages. +</para> +</listitem> +</varlistentry> + +</variablelist> + +<para> +Note: in addition to the camel case values shown above, lower case and upper case values are accepted as well. +</para> + +<para> +Example 1 - A Visual Studio 2022 build with user-defined script arguments: +<example_commands> +env = environment(MSVC_VERSION='14.3', MSVC_SCRIPT_ARGS=['8.1', 'store', '-vcvars_ver=14.1']) +env.Program('hello', ['hello.c'], CCFLAGS='/MD', LIBS=['kernel32', 'user32', 'runtimeobject']) +</example_commands> +</para> + +<para> +Example 1 - Output fragment: +<example_commands> +... +link /nologo /OUT:_build001\hello.exe kernel32.lib user32.lib runtimeobject.lib _build001\hello.obj +LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib' +... +</example_commands> +</para> + +<para> +Example 2 - A Visual Studio 2022 build with user-defined script arguments and the script error policy set +to issue a warning when msvc batch file errors are detected: +<example_commands> +env = environment(MSVC_VERSION='14.3', MSVC_SCRIPT_ARGS=['8.1', 'store', '-vcvars_ver=14.1'], MSVC_SCRIPTERROR_POLICY='warn') +env.Program('hello', ['hello.c'], CCFLAGS='/MD', LIBS=['kernel32', 'user32', 'runtimeobject']) +</example_commands> +</para> + +<para> +Example 2 - Output fragment: +<example_commands> +... +scons: warning: vc script errors detected: +[ERROR:vcvars.bat] The UWP Application Platform requires a Windows 10 SDK. +[ERROR:vcvars.bat] WindowsSdkDir = "C:\Program Files (x86)\Windows Kits\8.1\" +[ERROR:vcvars.bat] host/target architecture is not supported : { x64 , x64 } +... +link /nologo /OUT:_build001\hello.exe kernel32.lib user32.lib runtimeobject.lib _build001\hello.obj +LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib' +</example_commands> +</para> + +<para> +Important usage details: +<itemizedlist> + +<listitem><para> +&cv-MSVC_SCRIPTERROR_POLICY; must be passed as an argument to the &f-link-Environment; +constructor when an msvc tool (e.g., &t-link-msvc;, &t-link-msvs;, etc.) is +loaded via the default tools list or via a tools list passed to the +&f-link-Environment; constructor. +Otherwise, &cv-MSVC_SCRIPTERROR_POLICY; must be set before the first msvc tool is +loaded into the environment. +</para></listitem> + +<listitem><para> +Due to &scons; implementation details, not all Windows system environment variables are propagated +to the environment in which the msvc batch file is executed. Depending on Visual Studio version +and installation options, non-fatal msvc batch file error messages may be generated for ancillary +tools which may not affect builds with the msvc compiler. For this reason, caution is recommended +when setting the script error policy to raise an exception (e.g., <literal>'Error'</literal>). +</para></listitem> + +</itemizedlist> +</para> + +</listitem> + </varlistentry> + <varlistentry id="cv-MSVC_SDK_VERSION"> + <term> + <envar>MSVC_SDK_VERSION</envar> + </term> + <listitem><para> +Build with a specific version of the Microsoft Software Development Kit (SDK). +</para> + +<para> +The valid values for &cv-MSVC_SDK_VERSION; are: <literal>None</literal> +or a string containing the requested SDK version (e.g., <literal>'10.0.20348.0'</literal>). +</para> + +<para> +&cv-MSVC_SDK_VERSION; is ignored when the value is <literal>None</literal> and when +the value is an empty string. The validation conditions below do not apply. +</para> + +<para> +An exception is raised when any of the following conditions are satisfied: +<itemizedlist> + +<listitem><para> +&cv-MSVC_SDK_VERSION; is specified for Visual Studio 2013 and earlier. +</para></listitem> + +<listitem><para> +&cv-MSVC_SDK_VERSION; is specified and an SDK version argument is specified in +&cv-link-MSVC_SCRIPT_ARGS;. Multiple SDK version declarations via &cv-MSVC_SDK_VERSION; +and &cv-link-MSVC_SCRIPT_ARGS; are not allowed. +</para></listitem> + +<listitem><para> +The &cv-MSVC_SDK_VERSION; specified does not match any of the supported formats: +<itemizedlist> +<listitem><para> +<literal>'10.0.XXXXX.Y'</literal> [SDK 10.0] +</para></listitem> +<listitem><para> +<literal>'8.1'</literal> [SDK 8.1] +</para></listitem> +</itemizedlist> +</para></listitem> + +<listitem><para> +The system folder for the corresponding &cv-MSVC_SDK_VERSION; version is not found. +The requested SDK version does not appear to be installed. +</para></listitem> + +<listitem><para> +The &cv-MSVC_SDK_VERSION; version does not appear to support the requested platform +type (i.e., <literal>UWP</literal> or <literal>Desktop</literal>). The requested SDK version +platform type components do not appear to be installed. +</para></listitem> + +<listitem><para> +The &cv-MSVC_SDK_VERSION; version is <literal>8.1</literal>, the platform type is +<literal>UWP</literal>, and the build tools selected are from Visual Studio 2017 +and later (i.e., &cv-link-MSVC_VERSION; must be '14.0' or &cv-link-MSVC_TOOLSET_VERSION; +must be '14.0'). +</para></listitem> + +</itemizedlist> +</para> + +<para> +Example 1 - A Visual Studio 2022 build with a specific Windows SDK version: +<example_commands> +env = Environment(MSVC_VERSION='14.3', MSVC_SDK_VERSION='10.0.20348.0') +</example_commands> +</para> + +<para> +Example 2 - A Visual Studio 2022 build with a specific SDK version for the Universal Windows Platform: +<example_commands> +env = Environment(MSVC_VERSION='14.3', MSVC_SDK_VERSION='10.0.20348.0', MSVC_UWP_APP=True) +</example_commands> +</para> + +<para> +Important usage details: +<itemizedlist> + +<listitem><para> +&cv-MSVC_SDK_VERSION; must be passed as an argument to the &f-link-Environment; +constructor when an msvc tool (e.g., &t-link-msvc;, &t-link-msvs;, etc.) is +loaded via the default tools list or via a tools list passed to the +&f-link-Environment; constructor. +Otherwise, &cv-MSVC_SDK_VERSION; must be set before the first msvc tool is +loaded into the environment. +</para></listitem> + +<listitem> +<para><emphasis> +Should a SDK 10.0 version be installed that does not follow the naming scheme above, the +SDK version will need to be specified via &cv-link-MSVC_SCRIPT_ARGS; until the version number +validation format can be extended. +</emphasis></para> +</listitem> + +<listitem><para> +Should an exception be raised indicating that the SDK version is not found, verify that +the requested SDK version is installed with the necessary platform type components. +</para></listitem> + +<listitem><para> +There is a known issue with the Microsoft libraries when the target architecture is +<literal>ARM64</literal> and a Windows 11 SDK (version <literal>'10.0.22000.0'</literal> and later) is used +with the <literal>v141</literal> build tools and older <literal>v142</literal> toolsets +(versions <literal>'14.28.29333'</literal> and earlier). Should build failures arise with these combinations +of settings due to unresolved symbols in the Microsoft libraries, &cv-MSVC_SDK_VERSION; may be employed to +specify a Windows 10 SDK (e.g., <literal>'10.0.20348.0'</literal>) for the build. +</para></listitem> + +</itemizedlist> +</para> + +</listitem> + </varlistentry> + <varlistentry id="cv-MSVC_SPECTRE_LIBS"> + <term> + <envar>MSVC_SPECTRE_LIBS</envar> + </term> + <listitem><para> +Build with the spectre-mitigated Visual C++ libraries. +</para> + +<para> +The valid values for &cv-MSVC_SPECTRE_LIBS; are: <literal>True</literal>, +<literal>False</literal>, or <literal>None</literal>. +</para> + +<para> +When &cv-MSVC_SPECTRE_LIBS; is enabled (i.e., <literal>True</literal>), +the Visual C++ environment will include the paths to the spectre-mitigated implementations +of the Microsoft Visual C++ libraries. +</para> + +<para> +An exception is raised when any of the following conditions are satisfied: +<itemizedlist> + +<listitem><para> +&cv-MSVC_SPECTRE_LIBS; is enabled for Visual Studio 2015 and earlier. +</para></listitem> + +<listitem><para> +&cv-MSVC_SPECTRE_LIBS; is enabled and a spectre library argument is specified in +&cv-link-MSVC_SCRIPT_ARGS;. Multiple spectre library declarations via &cv-MSVC_SPECTRE_LIBS; +and &cv-link-MSVC_SCRIPT_ARGS; are not allowed. +</para></listitem> + +<listitem><para> +&cv-MSVC_SPECTRE_LIBS; is enabled and the platform type is <literal>UWP</literal>. There +are no spectre-mitigated libraries for Universal Windows Platform (UWP) applications or +components. +</para></listitem> + +</itemizedlist> +</para> + +<para> +Example - A Visual Studio 2022 build with spectre mitigated Visual C++ libraries: +<example_commands> +env = Environment(MSVC_VERSION='14.3', MSVC_SPECTRE_LIBS=True) +</example_commands> +</para> + +<para> +Important usage details: +<itemizedlist> + +<listitem><para> +&cv-MSVC_SPECTRE_LIBS; must be passed as an argument to the &f-link-Environment; +constructor when an msvc tool (e.g., &t-link-msvc;, &t-link-msvs;, etc.) is +loaded via the default tools list or via a tools list passed to the +&f-link-Environment; constructor. +Otherwise, &cv-MSVC_SPECTRE_LIBS; must be set before the first msvc tool is +loaded into the environment. +</para></listitem> + +<listitem><para> +Additional compiler switches (e.g., <literal>/Qspectre</literal>) are necessary for including +spectre mitigations when building user artifacts. Refer to the Visual Studio documentation for +details. +</para></listitem> + +<listitem><para> +<emphasis> +The existence of the spectre libraries host architecture and target architecture folders are not +verified when &cv-MSVC_SPECTRE_LIBS; is enabled which could result in build failures. +</emphasis> +The burden is on the user to ensure the requisite libraries with spectre mitigations are installed. +</para></listitem> + +</itemizedlist> +</para> + +</listitem> + </varlistentry> + <varlistentry id="cv-MSVC_TOOLSET_VERSION"> + <term> + <envar>MSVC_TOOLSET_VERSION</envar> + </term> + <listitem><para> +Build with a specific Visual C++ toolset version. +</para> + +<para><emphasis> +Specifying &cv-MSVC_TOOLSET_VERSION; does not affect the autodetection and selection +of msvc instances. The &cv-MSVC_TOOLSET_VERSION; is applied <emphasis>after</emphasis> +an msvc instance is selected. This could be the default version of msvc if &cv-link-MSVC_VERSION; +is not specified. +</emphasis></para> + +<para> +The valid values for &cv-MSVC_TOOLSET_VERSION; are: <literal>None</literal> +or a string containing the requested toolset version (e.g., <literal>'14.29'</literal>). +</para> + +<para> +&cv-MSVC_TOOLSET_VERSION; is ignored when the value is <literal>None</literal> and when +the value is an empty string. The validation conditions below do not apply. +</para> + +<para> +An exception is raised when any of the following conditions are satisfied: +<itemizedlist> + +<listitem><para> +&cv-MSVC_TOOLSET_VERSION; is specified for Visual Studio 2015 and earlier. +</para></listitem> + +<listitem><para> +&cv-MSVC_TOOLSET_VERSION; is specified and a toolset version argument is specified in +&cv-link-MSVC_SCRIPT_ARGS;. Multiple toolset version declarations via &cv-MSVC_TOOLSET_VERSION; +and &cv-link-MSVC_SCRIPT_ARGS; are not allowed. +</para></listitem> + +<listitem> +<para> +The &cv-MSVC_TOOLSET_VERSION; specified does not match any of the supported formats: +</para> + +<itemizedlist> + +<listitem><para> +<literal>'XX.Y'</literal> +</para></listitem> + +<listitem><para> +<literal>'XX.YY'</literal> +</para></listitem> + +<listitem><para> +<literal>'XX.YY.ZZZZZ'</literal> +</para></listitem> + +<listitem><para> +<literal>'XX.YY.Z'</literal> to <literal>'XX.YY.ZZZZ'</literal> +<emphasis> +[&scons; extension not directly supported by the msvc batch files and may be removed in the future] +</emphasis> +</para></listitem> + +<listitem><para> +<literal>'XX.YY.ZZ.N'</literal> [SxS format] +</para></listitem> + +<listitem><para> +<literal>'XX.YY.ZZ.NN'</literal> [SxS format] +</para></listitem> + +</itemizedlist> + +</listitem> + +<listitem><para> +The major msvc version prefix (i.e., <literal>'XX.Y'</literal>) of the &cv-MSVC_TOOLSET_VERSION; specified +is for Visual Studio 2013 and earlier (e.g., <literal>'12.0'</literal>). +</para></listitem> + +<listitem><para> +The major msvc version prefix (i.e., <literal>'XX.Y'</literal>) of the &cv-MSVC_TOOLSET_VERSION; specified +is greater than the msvc version selected (e.g., <literal>'99.0'</literal>). +</para></listitem> + +<listitem><para> +A system folder for the corresponding &cv-MSVC_TOOLSET_VERSION; version is not found. +The requested toolset version does not appear to be installed. +</para></listitem> + +</itemizedlist> +</para> + +<para> +Toolset selection details: +<itemizedlist> + +<listitem><para> +When &cv-MSVC_TOOLSET_VERSION; is not an SxS version number or a full toolset version number: +the first toolset version, ranked in descending order, that matches the &cv-MSVC_TOOLSET_VERSION; +prefix is selected. +</para></listitem> + +<listitem><para> +When &cv-MSVC_TOOLSET_VERSION; is specified using the major msvc version prefix +(i.e., <literal>'XX.Y'</literal>) and the major msvc version is that of the latest release of +Visual Studio, the selected toolset version may not be the same as the default Visual C++ toolset version. +</para><para> +In the latest release of Visual Studio, the default Visual C++ toolset version is not necessarily the +toolset with the largest version number. +</para></listitem> + +</itemizedlist> +</para> + +<para> +Example 1 - A default Visual Studio build with a partial toolset version specified: +<example_commands> +env = Environment(MSVC_TOOLSET_VERSION='14.2') +</example_commands> +</para> + +<para> +Example 2 - A default Visual Studio build with a partial toolset version specified: +<example_commands> +env = Environment(MSVC_TOOLSET_VERSION='14.29') +</example_commands> +</para> + +<para> +Example 3 - A Visual Studio 2022 build with a full toolset version specified: +<example_commands> +env = Environment(MSVC_VERSION='14.3', MSVC_TOOLSET_VERSION='14.29.30133') +</example_commands> +</para> + +<para> +Example 4 - A Visual Studio 2022 build with an SxS toolset version specified: +<example_commands> +env = Environment(MSVC_VERSION='14.3', MSVC_TOOLSET_VERSION='14.29.16.11') +</example_commands> +</para> + +<para> +Important usage details: +<itemizedlist> + +<listitem><para> +&cv-MSVC_TOOLSET_VERSION; must be passed as an argument to the &f-link-Environment; +constructor when an msvc tool (e.g., &t-link-msvc;, &t-link-msvs;, etc.) is +loaded via the default tools list or via a tools list passed to the +&f-link-Environment; constructor. +Otherwise, &cv-MSVC_TOOLSET_VERSION; must be set before the first msvc tool is +loaded into the environment. +</para></listitem> + +<listitem><para> +<emphasis> +The existence of the toolset host architecture and target architecture folders are not verified +when &cv-MSVC_TOOLSET_VERSION; is specified which could result in build failures. +</emphasis> +The burden is on the user to ensure the requisite toolset target architecture build tools are installed. +</para></listitem> + +</itemizedlist> +</para> </listitem> </varlistentry> @@ -4806,7 +5467,7 @@ is, if you are sure everything is set correctly already and you don't want &SCons; to change anything. </para> <para> -&cv-MSVC_USE_SCRIPT; overrides &cv-link-MSVC_VERSION; and &cv-link-TARGET_ARCH;. +&cv-MSVC_USE_SCRIPT; ignores &cv-link-MSVC_VERSION; and &cv-link-TARGET_ARCH;. </para> </listitem> </varlistentry> @@ -4879,9 +5540,28 @@ env = Environment(MSVC_VERSION='8.0', MSVC_USE_SETTINGS=msvc_use_settings) </para> <para> -Note: the dictionary content requirements are based on the internal msvc implementation and -therefore may change at any time. The burden is on the user to ensure the dictionary contents -are minimally sufficient to ensure successful builds. +Important usage details: +<itemizedlist> + +<listitem><para> +&cv-MSVC_USE_SETTINGS; must be passed as an argument to the &f-link-Environment; +constructor when an msvc tool (e.g., &t-link-msvc;, &t-link-msvs;, etc.) is +loaded via the default tools list or via a tools list passed to the +&f-link-Environment; constructor. +Otherwise, &cv-MSVC_USE_SETTINGS; must be set before the first msvc tool is +loaded into the environment. +</para></listitem> + +<listitem><para> +<emphasis> +The dictionary content requirements are based on the internal msvc implementation and +therefore may change at any time. +</emphasis> +The burden is on the user to ensure the dictionary contents are minimally sufficient to +ensure successful builds. +</para></listitem> + +</itemizedlist> </para> </listitem> @@ -4891,21 +5571,69 @@ are minimally sufficient to ensure successful builds. <envar>MSVC_UWP_APP</envar> </term> <listitem><para> -Build libraries for a Universal Windows Platform (UWP) Application. +Build with the Universal Windows Platform (UWP) application Visual C++ libraries. +</para> + +<para> +The valid values for &cv-MSVC_UWP_APP; are: <literal>True</literal>, +<literal>'1'</literal>, <literal>False</literal>, <literal>'0'</literal>, +or <literal>None</literal>. </para> <para> -If &cv-MSVC_UWP_APP; is set, the Visual C++ environment will be set up to point +When &cv-MSVC_UWP_APP; is enabled (i.e., <literal>True</literal> or +<literal>'1'</literal>), the Visual C++ environment will be set up to point to the Windows Store compatible libraries and Visual C++ runtimes. In doing so, any libraries that are built will be able to be used in a UWP App and published to the Windows Store. -This flag will only have an effect with Visual Studio 2015 or later. -This variable must be passed as an argument to the Environment() -constructor; setting it later has no effect. +<!-- This flag will only have an effect with Visual Studio 2015 or later. --> +<!-- This variable must be passed as an argument to the Environment() +constructor; setting it later has no effect. --> </para> <para> -Valid values are '1' or '0' +An exception is raised when any of the following conditions are satisfied: +<itemizedlist> +<listitem><para> +&cv-MSVC_UWP_APP; is enabled for Visual Studio 2013 and earlier. +</para></listitem> +<listitem><para> +&cv-MSVC_UWP_APP; is enabled and a UWP argument is specified in +&cv-link-MSVC_SCRIPT_ARGS;. Multiple UWP declarations via &cv-MSVC_UWP_APP; +and &cv-link-MSVC_SCRIPT_ARGS; are not allowed. +</para></listitem> +</itemizedlist> +</para> + +<para> +Example - A Visual Studio 2022 build for the Universal Windows Platform: +<example_commands> +env = Environment(MSVC_VERSION='14.3', MSVC_UWP_APP=True) +</example_commands> +</para> + +<para> +Important usage details: +<itemizedlist> + +<listitem><para> +&cv-MSVC_UWP_APP; must be passed as an argument to the &f-link-Environment; +constructor when an msvc tool (e.g., &t-link-msvc;, &t-link-msvs;, etc.) is +loaded via the default tools list or via a tools list passed to the +&f-link-Environment; constructor. +Otherwise, &cv-MSVC_UWP_APP; must be set before the first msvc tool is +loaded into the environment. +</para></listitem> + +<listitem><para> +<emphasis> +The existence of the UWP libraries is not verified when &cv-MSVC_UWP_APP; is enabled +which could result in build failures. +</emphasis> +The burden is on the user to ensure the requisite UWP libraries are installed. +</para></listitem> + +</itemizedlist> </para> </listitem> @@ -4922,8 +5650,15 @@ Sets the preferred version of Microsoft Visual C/C++ to use. If &cv-MSVC_VERSION; is not set, SCons will (by default) select the latest version of Visual C/C++ installed on your system. If the specified version isn't installed, tool initialization will fail. -This variable must be passed as an argument to the &f-link-Environment; -constructor; setting it later has no effect. +</para> + +<para> +&cv-MSVC_VERSION; must be passed as an argument to the &f-link-Environment; +constructor when an msvc tool (e.g., &t-link-msvc;, &t-link-msvs;, etc.) is +loaded via the default tools list or via a tools list passed to the +&f-link-Environment; constructor. +Otherwise, &cv-MSVC_VERSION; must be set before the first msvc tool is +loaded into the environment. </para> <para> @@ -6005,44 +6740,65 @@ A Python function used to print the command lines as they are executed or <option>-s</option> options or their equivalents). -The function should take four arguments: +The function must accept four arguments: <varname>s</varname>, -the command being executed (a string), <varname>target</varname>, -the target being built (file node, list, or string name(s)), +<varname>source</varname> and +<varname>env</varname>. +<varname>s</varname> +is a string showing the command being executed, +<varname>target</varname>, +is the target being built (file node, list, or string name(s)), <varname>source</varname>, -the source(s) used (file node, list, or string name(s)), and -<varname>env</varname>, -the environment being used. +is the source(s) used (file node, list, or string name(s)), +and <varname>env</varname> +is the environment being used. </para> <para> -The function must do the printing itself. The default implementation, -used if this variable is not set or is None, is: +The function must do the printing itself. +The default implementation, +used if this variable is not set or is <constant>None</constant>, +is to just print the string, as in: </para> <example_commands> def print_cmd_line(s, target, source, env): - sys.stdout.write(s + "\n") + sys.stdout.write(s + "\n") </example_commands> <para> -Here's an example of a more interesting function: +Here is an example of a more interesting function: </para> <example_commands> def print_cmd_line(s, target, source, env): - sys.stdout.write("Building %s -> %s...\n" % - (' and '.join([str(x) for x in source]), - ' and '.join([str(x) for x in target]))) -env=Environment(PRINT_CMD_LINE_FUNC=print_cmd_line) -env.Program('foo', 'foo.c') + sys.stdout.write( + "Building %s -> %s...\n" + % ( + ' and '.join([str(x) for x in source]), + ' and '.join([str(x) for x in target]), + ) + ) + +env = Environment(PRINT_CMD_LINE_FUNC=print_cmd_line) +env.Program('foo', ['foo.c', 'bar.c']) </example_commands> <para> -This just prints "Building <varname>targetname</varname> from <varname>sourcename</varname>..." instead -of the actual commands. -Such a function could also log the actual commands to a log file, -for example. +This prints: +</para> + +<screen> +... +scons: Building targets ... +Building bar.c -> bar.o... +Building foo.c -> foo.o... +Building foo.o and bar.o -> foo... +scons: done building targets. +</screen> + +<para> +Another example could be a function that logs the actual commands to a file. </para> </listitem> </varlistentry> @@ -7014,9 +7770,9 @@ targets. def custom_shell_env(env, target, source, shell_env): """customize shell_env if desired""" if str(target[0]) == 'special_target': - shell_env['SPECIAL_VAR'] = env.subst('SOME_VAR', target=target, source=source) + shell_env['SPECIAL_VAR'] = env.subst('SOME_VAR', target=target, source=source) return shell_env - + env["SHELL_ENV_GENERATORS"] = [custom_shell_env] </example_commands> @@ -7090,7 +7846,7 @@ Options that are passed to the Fortran 03 compiler to generated shared-library objects. You only need to set &cv-link-SHF03FLAGS; if you need to define specific user options for Fortran 03 files. -You should normally set the &cv-link-SHFORTRANFLAGS; variable, +You should normally set the &cv-link-FORTRANCOMMONFLAGS; variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -7178,7 +7934,7 @@ Options that are passed to the Fortran 08 compiler to generated shared-library objects. You only need to set &cv-link-SHF08FLAGS; if you need to define specific user options for Fortran 08 files. -You should normally set the &cv-link-SHFORTRANFLAGS; variable, +You should normally set the &cv-link-FORTRANCOMMONFLAGS; variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -7266,7 +8022,7 @@ Options that are passed to the Fortran 77 compiler to generated shared-library objects. You only need to set &cv-link-SHF77FLAGS; if you need to define specific user options for Fortran 77 files. -You should normally set the &cv-link-SHFORTRANFLAGS; variable, +You should normally set the &cv-link-FORTRANCOMMONFLAGS; variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -7354,7 +8110,7 @@ Options that are passed to the Fortran 90 compiler to generated shared-library objects. You only need to set &cv-link-SHF90FLAGS; if you need to define specific user options for Fortran 90 files. -You should normally set the &cv-link-SHFORTRANFLAGS; variable, +You should normally set the &cv-link-FORTRANCOMMONFLAGS; variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -7442,7 +8198,7 @@ Options that are passed to the Fortran 95 compiler to generated shared-library objects. You only need to set &cv-link-SHF95FLAGS; if you need to define specific user options for Fortran 95 files. -You should normally set the &cv-link-SHFORTRANFLAGS; variable, +You should normally set the &cv-link-FORTRANCOMMONFLAGS; variable, which specifies the user-specified options passed to the default Fortran compiler for all Fortran versions. @@ -7816,7 +8572,7 @@ which would be a symlink and point to <filename>libtest.so.0.1.2</filename> </term> <listitem><para> A command interpreter function that will be called to execute command line -strings. The function must expect the following arguments: +strings. The function must accept five arguments: </para> <example_commands> @@ -7824,18 +8580,18 @@ def spawn(shell, escape, cmd, args, env): </example_commands> <para> -<varname>sh</varname> -is a string naming the shell program to use. +<varname>shell</varname> +is a string naming the shell program to use, <varname>escape</varname> is a function that can be called to escape shell special characters in -the command line. +the command line, <varname>cmd</varname> -is the path to the command to be executed. +is the path to the command to be executed, <varname>args</varname> -is the arguments to the command. +holds the arguments to the command and <varname>env</varname> -is a dictionary of the environment variables -in which the command should be executed. +is a dictionary of environment variables +defining the execution environment in which the command should be executed. </para> </listitem> </varlistentry> diff --git a/doc/generated/variables.mod b/doc/generated/variables.mod index c5cd0cd..5d89887 100644 --- a/doc/generated/variables.mod +++ b/doc/generated/variables.mod @@ -186,6 +186,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. <!ENTITY cv-File "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$File</envar>"> <!ENTITY cv-FORTRAN "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$FORTRAN</envar>"> <!ENTITY cv-FORTRANCOM "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$FORTRANCOM</envar>"> +<!ENTITY cv-FORTRANCOMMONFLAGS "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$FORTRANCOMMONFLAGS</envar>"> <!ENTITY cv-FORTRANCOMSTR "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$FORTRANCOMSTR</envar>"> <!ENTITY cv-FORTRANFILESUFFIXES "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$FORTRANFILESUFFIXES</envar>"> <!ENTITY cv-FORTRANFLAGS "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$FORTRANFLAGS</envar>"> @@ -321,6 +322,11 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. <!ENTITY cv-MSSDK_VERSION "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$MSSDK_VERSION</envar>"> <!ENTITY cv-MSVC_BATCH "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$MSVC_BATCH</envar>"> <!ENTITY cv-MSVC_NOTFOUND_POLICY "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$MSVC_NOTFOUND_POLICY</envar>"> +<!ENTITY cv-MSVC_SCRIPT_ARGS "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$MSVC_SCRIPT_ARGS</envar>"> +<!ENTITY cv-MSVC_SCRIPTERROR_POLICY "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$MSVC_SCRIPTERROR_POLICY</envar>"> +<!ENTITY cv-MSVC_SDK_VERSION "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$MSVC_SDK_VERSION</envar>"> +<!ENTITY cv-MSVC_SPECTRE_LIBS "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$MSVC_SPECTRE_LIBS</envar>"> +<!ENTITY cv-MSVC_TOOLSET_VERSION "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$MSVC_TOOLSET_VERSION</envar>"> <!ENTITY cv-MSVC_USE_SCRIPT "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$MSVC_USE_SCRIPT</envar>"> <!ENTITY cv-MSVC_USE_SCRIPT_ARGS "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$MSVC_USE_SCRIPT_ARGS</envar>"> <!ENTITY cv-MSVC_USE_SETTINGS "<envar xmlns='http://www.scons.org/dbxsd/v1.0'>$MSVC_USE_SETTINGS</envar>"> @@ -850,6 +856,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. <!ENTITY cv-link-File "<link linkend='cv-File' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$File</envar></link>"> <!ENTITY cv-link-FORTRAN "<link linkend='cv-FORTRAN' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$FORTRAN</envar></link>"> <!ENTITY cv-link-FORTRANCOM "<link linkend='cv-FORTRANCOM' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$FORTRANCOM</envar></link>"> +<!ENTITY cv-link-FORTRANCOMMONFLAGS "<link linkend='cv-FORTRANCOMMONFLAGS' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$FORTRANCOMMONFLAGS</envar></link>"> <!ENTITY cv-link-FORTRANCOMSTR "<link linkend='cv-FORTRANCOMSTR' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$FORTRANCOMSTR</envar></link>"> <!ENTITY cv-link-FORTRANFILESUFFIXES "<link linkend='cv-FORTRANFILESUFFIXES' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$FORTRANFILESUFFIXES</envar></link>"> <!ENTITY cv-link-FORTRANFLAGS "<link linkend='cv-FORTRANFLAGS' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$FORTRANFLAGS</envar></link>"> @@ -985,6 +992,11 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. <!ENTITY cv-link-MSSDK_VERSION "<link linkend='cv-MSSDK_VERSION' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$MSSDK_VERSION</envar></link>"> <!ENTITY cv-link-MSVC_BATCH "<link linkend='cv-MSVC_BATCH' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$MSVC_BATCH</envar></link>"> <!ENTITY cv-link-MSVC_NOTFOUND_POLICY "<link linkend='cv-MSVC_NOTFOUND_POLICY' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$MSVC_NOTFOUND_POLICY</envar></link>"> +<!ENTITY cv-link-MSVC_SCRIPT_ARGS "<link linkend='cv-MSVC_SCRIPT_ARGS' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$MSVC_SCRIPT_ARGS</envar></link>"> +<!ENTITY cv-link-MSVC_SCRIPTERROR_POLICY "<link linkend='cv-MSVC_SCRIPTERROR_POLICY' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$MSVC_SCRIPTERROR_POLICY</envar></link>"> +<!ENTITY cv-link-MSVC_SDK_VERSION "<link linkend='cv-MSVC_SDK_VERSION' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$MSVC_SDK_VERSION</envar></link>"> +<!ENTITY cv-link-MSVC_SPECTRE_LIBS "<link linkend='cv-MSVC_SPECTRE_LIBS' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$MSVC_SPECTRE_LIBS</envar></link>"> +<!ENTITY cv-link-MSVC_TOOLSET_VERSION "<link linkend='cv-MSVC_TOOLSET_VERSION' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$MSVC_TOOLSET_VERSION</envar></link>"> <!ENTITY cv-link-MSVC_USE_SCRIPT "<link linkend='cv-MSVC_USE_SCRIPT' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$MSVC_USE_SCRIPT</envar></link>"> <!ENTITY cv-link-MSVC_USE_SCRIPT_ARGS "<link linkend='cv-MSVC_USE_SCRIPT_ARGS' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$MSVC_USE_SCRIPT_ARGS</envar></link>"> <!ENTITY cv-link-MSVC_USE_SETTINGS "<link linkend='cv-MSVC_USE_SETTINGS' xmlns='http://www.scons.org/dbxsd/v1.0'><envar>$MSVC_USE_SETTINGS</envar></link>"> |