summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Featherstone <andrew.featherstone@cantab.net>2014-07-21 23:36:03 +0100
committerAndrew Featherstone <andrew.featherstone@cantab.net>2014-07-21 23:36:03 +0100
commitbfb98081c448458cd05a7870eab45e654eac0a92 (patch)
tree55d4acd024c1cb4035058fbdcbf234ae5563a72e
parent53e30bebc2a633fc95589b9dfe663483775138a5 (diff)
downloadscons-git-bfb98081c448458cd05a7870eab45e654eac0a92.tar.gz
Adds basic documentation of the CheckTypeSize method.
-rw-r--r--doc/scons.mod1
-rw-r--r--doc/user/sconf.xml20
2 files changed, 21 insertions, 0 deletions
diff --git a/doc/scons.mod b/doc/scons.mod
index be2dc2420..72dc7ff27 100644
--- a/doc/scons.mod
+++ b/doc/scons.mod
@@ -277,6 +277,7 @@
<!ENTITY CheckLib "<function xmlns='http://www.scons.org/dbxsd/v1.0'>CheckLib</function>">
<!ENTITY CheckLibWithHeader "<function xmlns='http://www.scons.org/dbxsd/v1.0'>CheckLibWithHeader</function>">
<!ENTITY CheckType "<function xmlns='http://www.scons.org/dbxsd/v1.0'>CheckType</function>">
+<!ENTITY CheckTypeSize "<function xmlns='http://www.scons.org/dbxsd/v1.0'>CheckTypeSize</function>">
<!ENTITY TryAction "<function xmlns='http://www.scons.org/dbxsd/v1.0'>TryAction</function>">
<!ENTITY TryBuild "<function xmlns='http://www.scons.org/dbxsd/v1.0'>TryBuild</function>">
<!ENTITY TryCompile "<function xmlns='http://www.scons.org/dbxsd/v1.0'>TryCompile</function>">
diff --git a/doc/user/sconf.xml b/doc/user/sconf.xml
index ff39b6b45..214569db2 100644
--- a/doc/user/sconf.xml
+++ b/doc/user/sconf.xml
@@ -282,6 +282,26 @@ env = conf.Finish()
</sconstruct>
</section>
+ <section>
+ <title>Checking the size of a datatype</title>
+ <para>
+ Check the size of a datatype by using the &CheckTypeSize; method:
+ </para>
+
+ <sconstruct>
+env = Environment()
+conf = Configure(env)
+int_size = conf.CheckTypeSize('unsigned int')
+print 'sizeof unsigned int is', int_size
+env = conf.Finish()
+ </sconstruct>
+
+ <screen>
+% <userinput>scons -Q</userinput>
+sizeof unsigned int is 4
+scons: `.' is up to date.
+ </screen>
+ </section>
<section>
<title>Adding Your Own Custom Checks</title>