diff options
author | Mats Wichmann <mats@linux.com> | 2021-02-26 11:31:01 -0700 |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2021-02-26 11:31:37 -0700 |
commit | 21470ff129d38680ac3d5d25098ee9428a4c6856 (patch) | |
tree | 284f9555b5e6c687387c59aa2242b87805a71802 /SCons/Environment.xml | |
parent | af3af1910440bfa8a8793dae3bec0d5c6598a6da (diff) | |
download | scons-git-21470ff129d38680ac3d5d25098ee9428a4c6856.tar.gz |
Further minor tweak on CPPDEFINES usage [skip appveyor] [skip travis]
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Environment.xml')
-rw-r--r-- | SCons/Environment.xml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/SCons/Environment.xml b/SCons/Environment.xml index c5c8d4d9d..5b039ff1f 100644 --- a/SCons/Environment.xml +++ b/SCons/Environment.xml @@ -488,7 +488,7 @@ Multiple targets can be passed in to a single call to <para> Intelligently append values to &consvars; in the &consenv; named by <varname>env</varname>. -The &consvars; and values to add to them are passed as +The &consvars; and values to add to them are passed as <parameter>key=val</parameter> pairs (Python keyword arguments). &f-env-Append; is designed to allow adding values without normally having to know the data type of an existing &consvar;. @@ -524,15 +524,16 @@ but there are a few special cases to be aware of. When two strings are combined, the result is normally a new string, with the caller responsible for supplying any needed separation. -The exception to this is the &consvar; &cv-link-CPPDEFINES; -in which each entry will be postprocessed, +The exception to this is the &consvar; &cv-link-CPPDEFINES;, +in which each item will be postprocessed by adding a prefix +and/or suffix, so the contents are treated as a list of strings, that is, adding a string will result in a separate string entry, not a combined string. For &cv-CPPDEFINES; as well as for &cv-link-LIBS;, and the various <varname>*PATH</varname> variables, &SCons; will supply the compiler-specific -syntax (e.g. adding <literal>-D</literal> or <literal>/D</literal> -for &cv-CPPDEFINES;), so this syntax should be omitted when +syntax (e.g. adding a <literal>-D</literal> or <literal>/D</literal> +prefix for &cv-CPPDEFINES;), so this syntax should be omitted when adding values to these variables. Example (gcc syntax shown in the expansion of &CPPDEFINES;): </para> @@ -562,7 +563,7 @@ Preprocessor macros can be valued, or un-valued, as in <computeroutput>-DBAR=1</computeroutput> or <computeroutput>-DFOO</computeroutput>. The macro can be be supplied as a complete string including the value, -or as a tuple/list of macro/value, or as a dictionary. +or as a tuple (or list) of macro, value, or as a dictionary. Example (again gcc syntax in the expanded defines): </para> |