nimble 'build_ex' task: only set -d:release / -opt:speed neither release or debug is defined

Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
This commit is contained in:
Christopher Arndt 2024-04-20 20:33:22 +02:00
parent de6512b420
commit 6c57a8b249
1 changed files with 6 additions and 2 deletions

View File

@ -57,9 +57,13 @@ task build_ex, "Build given example plugin":
switch("app", "lib")
switch("noMain", "on")
switch("mm", "arc")
switch("opt", "speed")
switch("define", "release")
switch("out", dll)
when not defined(release) and not defined(debug):
echo &"Compiling plugin {example} in release mode."
switch("define", "release")
switch("opt", "speed")
setCommand("compile", source)
else:
echo &"Example '{example}' not found."