fish-shell/muparser-2.2.5/build/bakefiles/presets/debugopt.bkl
David Adam 1590bd15f1 MuParser: restore build system
Restores the build files mistakenly dropped in 86b1c5a5a4.
2017-08-25 09:04:50 +08:00

55 lines
1.5 KiB
XML

<?xml version="1.0" ?>
<!-- $Id: debugopt.bkl 40 2006-12-02 15:22:02Z frm $ -->
<!--
Adds the logic for handling a DEBUG=0/1 option, which switches between debug and
release builds.
Usage: use template "debugopt" for your targets:
<include file="presets/debugopt.bkl"/>
<exe id="myapp" template="debugopt">
<sources>myapp.cpp</sources>
</exe>
-->
<makefile>
<set var="DEBUG_DEFAULT" overwrite="0">0</set>
<option name="DEBUG">
<values>0,1</values>
<default-value>$(DEBUG_DEFAULT)</default-value>
<values-description>Release,Debug</values-description>
<description>Set to 1 to build debug version</description>
</option>
<template id="debugopt">
<define>
$(substituteFromDict(DEBUG,{'1':'','0':'NDEBUG'}))
</define>
<optimize>
$(substituteFromDict(DEBUG,{'1':'off','0':'speed'}))
</optimize>
<debug-info>
$(substituteFromDict(DEBUG,{'1':'on','0':'off'}))
</debug-info>
<warnings>
$(substituteFromDict(DEBUG,{'1':'max','0':'no'}))
</warnings>
<debug-runtime-libs>
$(substituteFromDict(DEBUG,{'1':'on','0':'off'}))
</debug-runtime-libs>
</template>
<!-- The DEBUGBUILDPOSTFIX variable is useful to set the BUILDDIR variable
as done in presets/setbuilddir.bkl -->
<set var="DEBUGBUILDPOSTFIX">
<if cond="DEBUG=='0'">rel</if>
<if cond="DEBUG=='1'">dbg</if>
</set>
</makefile>