diff options
Diffstat (limited to 'build.html')
| -rw-r--r-- | build.html | 59 |
1 files changed, 51 insertions, 8 deletions
@@ -100,7 +100,10 @@ function main() { <li> <a class="reference reference-toplevel" href="#7" id="57">Types</a> <ul class="simple simple-toc-section"> - <li><a class="reference" href="#Config" + <li><a class="reference" href="#BuildType" + title="BuildType = enum + btAutoconf, btCmake"><wbr />Build<wbr />Type<span class="attachedType"></span></a></li> + <li><a class="reference" href="#Config" title="Config = ref object NimMajor*: int NimMinor*: int @@ -112,6 +115,16 @@ function main() { </ul> </li> <li> + <a class="reference reference-toplevel" href="#8" id="58">Vars</a> + <ul class="simple simple-toc-section"> + <li><a class="reference" href="#gDebug" + title="gDebug = false"><wbr />g<wbr />Debug<span class="attachedType"></span></a></li> + <li><a class="reference" href="#gDebugCT" + title="gDebugCT = false"><wbr />g<wbr />Debug<wbr />CT<span class="attachedType"></span></a></li> + + </ul> +</li> +<li> <a class="reference reference-toplevel" href="#12" id="62">Procs</a> <ul class="simple simple-toc-section"> <li><a class="reference" href="#sanitizePath%2Cstring" @@ -201,11 +214,12 @@ function main() { title="clearDefines(): untyped"><wbr />clear<wbr />Defines<span class="attachedType"></span></a></li> <li><a class="reference" href="#isDefined.m%2Cuntyped" title="isDefined(def: untyped): untyped"><wbr />is<wbr />Defined<span class="attachedType"></span></a></li> - <li><a class="reference" href="#getHeader.m%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D" + <li><a class="reference" href="#getHeader.m%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5BopenArray%5BBuildType%5D%5D" title="getHeader(header: static[string]; giturl: static[string] = ""; dlurl: static[string] = ""; outdir: static[string] = ""; conFlags: static[string] = ""; cmakeFlags: static[string] = ""; - makeFlags: static[string] = ""; altNames: static[string] = ""): untyped"><wbr />get<wbr />Header<span class="attachedType"></span></a></li> + makeFlags: static[string] = ""; altNames: static[string] = ""; + buildTypes: static[openArray[BuildType]] = [btCmake, btAutoconf]): untyped"><wbr />get<wbr />Header<span class="attachedType">BuildType</span></a></li> </ul> </li> @@ -220,6 +234,14 @@ function main() { <div class="section" id="7"> <h1><a class="toc-backref" href="#7">Types</a></h1> <dl class="item"> +<a id="BuildType"></a> +<dt><pre><a href="build.html#BuildType"><span class="Identifier">BuildType</span></a> <span class="Other">=</span> <span class="Keyword">enum</span> + <span class="Identifier">btAutoconf</span><span class="Other">,</span> <span class="Identifier">btCmake</span></pre></dt> +<dd> + + + +</dd> <a id="Config"></a> <dt><pre><a href="build.html#Config"><span class="Identifier">Config</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Identifier">NimMajor</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int</span> @@ -236,6 +258,25 @@ function main() { </dd> </dl></div> +<div class="section" id="8"> +<h1><a class="toc-backref" href="#8">Vars</a></h1> +<dl class="item"> +<a id="gDebug"></a> +<dt><pre><a href="build.html#gDebug"><span class="Identifier">gDebug</span></a> <span class="Other">=</span> <span class="Identifier">false</span></pre></dt> +<dd> + + + +</dd> +<a id="gDebugCT"></a> +<dt><pre><a href="build.html#gDebugCT"><span class="Identifier">gDebugCT</span></a> <span class="Other">=</span> <span class="DecNumber">false</span></pre></dt> +<dd> + + + +</dd> + +</dl></div> <div class="section" id="12"> <h1><a class="toc-backref" href="#12">Procs</a></h1> <dl class="item"> @@ -436,7 +477,7 @@ Hard reset the git repository at the specified directory </dd> <a id="gitCheckout,string,string"></a> -<dt><pre><span class="Keyword">proc</span> <a href="#gitCheckout%2Cstring%2Cstring"><span class="Identifier">gitCheckout</span></a><span class="Other">(</span><span class="Identifier">file</span><span class="Other">,</span> <span class="Identifier">outdir</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">OSError</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">,</span> +<dt><pre><span class="Keyword">proc</span> <a href="#gitCheckout%2Cstring%2Cstring"><span class="Identifier">gitCheckout</span></a><span class="Other">(</span><span class="Identifier">file</span><span class="Other">,</span> <span class="Identifier">outdir</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">OSError</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">Defect</span><span class="Other">,</span> <span class="Identifier">KeyError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">ExecIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadEnvEffect</span><span class="Other">,</span> <span class="Identifier">ReadDirEffect</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt> <dd> @@ -660,11 +701,12 @@ Clear all defines set using <tt class="docutils literal"><span class="pre">setDe Check if <tt class="docutils literal"><span class="pre">-d:xxx</span></tt> is set globally or via <tt class="docutils literal"><span class="pre">setDefines()</span></tt> </dd> -<a id="getHeader.m,static[string],static[string],static[string],static[string],static[string],static[string],static[string],static[string]"></a> -<dt><pre><span class="Keyword">macro</span> <a href="#getHeader.m%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D"><span class="Identifier">getHeader</span></a><span class="Other">(</span><span class="Identifier">header</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">giturl</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> <span class="Other">=</span> <span class="StringLit">""</span><span class="Other">;</span> +<a id="getHeader.m,static[string],static[string],static[string],static[string],static[string],static[string],static[string],static[string],static[openArray[BuildType]]"></a> +<dt><pre><span class="Keyword">macro</span> <a href="#getHeader.m%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5Bstring%5D%2Cstatic%5BopenArray%5BBuildType%5D%5D"><span class="Identifier">getHeader</span></a><span class="Other">(</span><span class="Identifier">header</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">giturl</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> <span class="Other">=</span> <span class="StringLit">""</span><span class="Other">;</span> <span class="Identifier">dlurl</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> <span class="Other">=</span> <span class="StringLit">""</span><span class="Other">;</span> <span class="Identifier">outdir</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> <span class="Other">=</span> <span class="StringLit">""</span><span class="Other">;</span> <span class="Identifier">conFlags</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> <span class="Other">=</span> <span class="StringLit">""</span><span class="Other">;</span> <span class="Identifier">cmakeFlags</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> <span class="Other">=</span> <span class="StringLit">""</span><span class="Other">;</span> - <span class="Identifier">makeFlags</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> <span class="Other">=</span> <span class="StringLit">""</span><span class="Other">;</span> <span class="Identifier">altNames</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> <span class="Other">=</span> <span class="StringLit">""</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">untyped</span></pre></dt> + <span class="Identifier">makeFlags</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> <span class="Other">=</span> <span class="StringLit">""</span><span class="Other">;</span> <span class="Identifier">altNames</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> <span class="Other">=</span> <span class="StringLit">""</span><span class="Other">;</span> + <span class="Identifier">buildTypes</span><span class="Other">:</span> <span class="Identifier">static</span><span class="Other">[</span><span class="Identifier">openArray</span><span class="Other">[</span><a href="build.html#BuildType"><span class="Identifier">BuildType</span></a><span class="Other">]</span><span class="Other">]</span> <span class="Other">=</span> <span class="Other">[</span><span class="Identifier">btCmake</span><span class="Other">,</span> <span class="Identifier">btAutoconf</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">untyped</span></pre></dt> <dd> <p>Get the path to a header file for wrapping with <a class="reference external" href="cimport.html#cImport.m%2C%2Cstring%2Cstring%2Cstring">cImport()</a> or <a class="reference external" href="cimport.html#c2nImport.m%2C%2Cstring%2Cstring%2Cstring">c2nImport()</a>.</p> @@ -679,6 +721,7 @@ Check if <tt class="docutils literal"><span class="pre">-d:xxx</span></tt> is se <p><tt class="docutils literal"><span class="pre">-d:xxxStatic</span></tt> can be specified to statically link with the library instead. This will automatically add a <tt class="docutils literal"><span class="pre">{.passL.}</span></tt> call to the static library for convenience.</p> <p><tt class="docutils literal"><span class="pre">conFlags</span></tt>, <tt class="docutils literal"><span class="pre">cmakeFlags</span></tt> and <tt class="docutils literal"><span class="pre">makeFlags</span></tt> allow sending custom parameters to <tt class="docutils literal"><span class="pre">configure</span></tt>, <tt class="docutils literal"><span class="pre">cmake</span></tt> and <tt class="docutils literal"><span class="pre">make</span></tt> in case additional configuration is required as part of the build process.</p> <p><tt class="docutils literal"><span class="pre">altNames</span></tt> is a list of alternate names for the library - e.g. zlib uses <tt class="docutils literal"><span class="pre">zlib.h</span></tt> for the header but the typical lib name is <tt class="docutils literal"><span class="pre">libz.so</span></tt> and not <tt class="docutils literal"><span class="pre">libzlib.so</span></tt>. However, it is libzlib.dll on Windows if built with cmake. In this case, <tt class="docutils literal"><span class="pre">altNames = "z,zlib"</span></tt>. Comma separate for multiple alternate names without spaces.</p> +<p><tt class="docutils literal"><span class="pre">buildTypes</span></tt> specifies a list of in order build strategies to use when building the downloaded source files. Default is [btCmake, btAutoconf]</p> <p>The original header name is not included by default if <tt class="docutils literal"><span class="pre">altNames</span></tt> is set since it could cause the wrong lib to be selected. E.g. <tt class="docutils literal"><span class="pre">SDL2/SDL.h</span></tt> could pick <tt class="docutils literal"><span class="pre">libSDL.so</span></tt> even if <tt class="docutils literal"><span class="pre">altNames = "SDL2"</span></tt>. Explicitly include it in <tt class="docutils literal"><span class="pre">altNames</span></tt> like the <tt class="docutils literal"><span class="pre">zlib</span></tt> example when required.</p> <p><tt class="docutils literal"><span class="pre">xxxPreBuild</span></tt> is a hook that is called after the source code is pulled from Git or downloaded but before the library is built. This might be needed if some initial prep needs to be done before compilation. A few values are provided to the hook to help provide context:</p> <p><tt class="docutils literal"><span class="pre">outdir</span></tt> is the same <tt class="docutils literal"><span class="pre">outdir</span></tt> passed in and <tt class="docutils literal"><span class="pre">header</span></tt> is the discovered header path in the downloaded source code.</p> @@ -696,7 +739,7 @@ Check if <tt class="docutils literal"><span class="pre">-d:xxx</span></tt> is se <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2020-04-28 21:50:50 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2020-05-11 03:35:45 UTC</small> </div> </div> </div> |
